git.iko.soy/typeable/pandoc
on master help sign in
Docx reader: tests for removing unused anchors.
commit475b0dcb66c2a7cdc78022b4dcb7c7fbb17ab309 authorJesse Rosenthal <jrosenthal@jhu.edu> dateSat 30 Dec 2017, 22:43 (9 years ago) parente90c714
3 files changed+7
test/Tests/Readers/Docx.hs+4 test/docx/unused_anchors.docx test/docx/unused_anchors.native+3
test/Tests/Readers/Docx.hs+4
@@ -175,6 +175,10 @@ tests = [ testGroup "inlines"
175175 "inlines inside of Structured Document Tags"
176176 "docx/sdt_elements.docx"
177177 "docx/sdt_elements.native"
178+ , testCompare
179+ "remove anchor spans with nothing pointing to them"
180+ "docx/unused_anchors.docx"
181+ "docx/unused_anchors.native"
178182 ]
179183 , testGroup "blocks"
180184 [ testCompare
test/docx/unused_anchors.docxnew file

Binary file not shown.

test/docx/unused_anchors.nativenew file+3
@@ -0,0 +1,3 @@
1+[Header 1 ("my-section",[],[]) [Str "My",Space,Str "Section"]
2+,Para [Link ("",[],[]) [Str "Here",Space,Str "is",Space,Str "a",Space,Str "link."] ("#Bar","")]
3+,Para [Span ("Bar",["anchor"],[]) [],Str "Here",Space,Str "is",Space,Str "the",Space,Str "target."]]