git.iko.soy/typeable/pandoc
on master help sign in
Docx reader: tests for overlapping targets (anchor spans).
commit3f30455b4989e7a31a59b7278175476cfd95d41d authorJesse Rosenthal <jrosenthal@jhu.edu> dateSun 31 Dec 2017, 09:36 (9 years ago) parent836153d
3 files changed+7
test/Tests/Readers/Docx.hs+4 test/docx/overlapping_targets.docx test/docx/overlapping_targets.native+3
test/Tests/Readers/Docx.hs+4
@@ -179,6 +179,10 @@ tests = [ testGroup "inlines"
179179 "remove anchor spans with nothing pointing to them"
180180 "docx/unused_anchors.docx"
181181 "docx/unused_anchors.native"
182+ , testCompare
183+ "collapse overlapping targets (anchor spans)"
184+ "docx/overlapping_targets.docx"
185+ "docx/overlapping_targets.native"
182186 ]
183187 , testGroup "blocks"
184188 [ testCompare
test/docx/overlapping_targets.docxnew file

Binary file not shown.

test/docx/overlapping_targets.nativenew file+3
@@ -0,0 +1,3 @@
1+[Para [Link ("",[],[]) [Str "One",Space,Str "link",Space,Str "to",Space,Str "one",Space,Str "target."] ("#Fizz","")]
2+,Para [Span ("Fizz",["anchor"],[]) [],Str "This",Space,Str "is",Space,Str "a",Space,Str "target",Space,Str "with",Space,Str "two",Space,Str "names."]
3+,Para [Link ("",[],[]) [Str "Another",Space,Str "link",Space,Str "to",Space,Str "the",Space,Str "same",Space,Str "target."] ("#Fizz","")]]