git.iko.soy/typeable/pandoc
on master help sign in
Docx reader: Add tests for avoiding zero-level header.
a67a96bJesse Rosenthal
test/Tests/Readers/Docx.hs+4
@@ -185,6 +185,10 @@ tests = [ testGroup "inlines"
185 "headers already having auto identifiers"
185 "headers already having auto identifiers"
186 "docx/already_auto_ident.docx"
186 "docx/already_auto_ident.docx"
187 "docx/already_auto_ident.native"
187 "docx/already_auto_ident.native"
188+ , testCompare
189+ "avoid zero-level headers"
190+ "docx/0_level_headers.docx"
191+ "docx/0_level_headers.native"
188 , testCompare
192 , testCompare
189 "nested anchor spans in header"
193 "nested anchor spans in header"
190 "docx/nested_anchors_in_header.docx"
194 "docx/nested_anchors_in_header.docx"
test/docx/0_level_headers.docxnew file

Binary file not shown.

test/docx/0_level_headers.nativenew file+25
@@ -0,0 +1,25 @@
1+[Table [] [AlignDefault] [0.0]
2+ [[]]
3+ [[[]]
4+ ,[[Plain [Str "User\8217s",Space,Str "Guide"]]]
5+ ,[[]]
6+ ,[[]]
7+ ,[[]]
8+ ,[[Plain [Str "11",Space,Str "August",Space,Str "2017"]]]
9+ ,[[]]
10+ ,[[]]
11+ ,[[]]
12+ ,[[]]]
13+,Para [Str "CONTENTS"]
14+,Para [Strong [Str "Section",Space,Str "Page"]]
15+,Para [Str "FIGURES",Space,Str "iv"]
16+,Para [Str "TABLES",Space,Str "v"]
17+,Para [Str "SECTION",Space,Str "1",Space,Str "Introduction",Space,Str "2"]
18+,Header 1 ("figures",["Heading0"],[]) [Str "FIGURES"]
19+,Para [Strong [Str "Figure",Space,Str "Page"]]
20+,Para [Strong [Str "No",Space,Str "table",Space,Str "of",Space,Str "figures",Space,Str "entries",Space,Str "found."]]
21+,Header 1 ("tables",["Heading0"],[]) [Str "TABLES"]
22+,Para [Strong [Str "Table",Space,Str "Page"]]
23+,Para [Strong [Str "No",Space,Str "table",Space,Str "of",Space,Str "figures",Space,Str "entries",Space,Str "found."]]
24+,Header 1 ("introduction",[],[]) [Str "Introduction"]
25+,Para [Str "Nothing",Space,Str "to",Space,Str "introduce,",Space,Str "yet."]]