private static void parse() { makeImagesDirectory(); var parser = new DocXParser(); var text = parser.Parse(); var file = Path.GetFileNameWithoutExtension( Global.Filename ); File.WriteAllText( file + ".md", text ); }
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 ); }
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 ); }
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 ); }