示例#1
0
    private static void parse() {
      makeImagesDirectory();
      var parser = new DocXParser();
      var text = parser.Parse();

      var file = Path.GetFileNameWithoutExtension( Global.Filename );
      File.WriteAllText( file + ".md", text );
    }
示例#2
0
 public void Picture_ShouldParsePicture() {
   Global.Filename = @"./docx/picture.docx";
   var parser = new DocXParser();
   var result = parser.Parse().Replace( '\r'.ToString(), String.Empty );
   Assert.Equal( "![Obraz 1](./picture_images/image1.jpg)", result );
 }
示例#3
0
 public void List_ShouldProperParseUnorderedList() {
   Global.Filename = @"./docx/unordered_list.docx";
   var parser = new DocXParser();
   var result = parser.Parse().Replace( '\r'.ToString(), String.Empty );
   Assert.Equal( File.ReadAllText( @"./md/unordered_list.md" ), result );
 }
示例#4
0
 public void Headers_ShouldProperParseHeaders() {
   Global.Filename = @"./docx/headers_and_paragraph.docx";
   var parser = new DocXParser();
   var result = parser.Parse().Replace( '\r'.ToString(), String.Empty );
   Assert.Equal( File.ReadAllText( @"./md/headers_and_paragraph.md" ), result );
 }