예제 #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 );
 }