diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-12-02 15:31:53 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-12-02 16:51:31 -0800 |
commit | d6c58eb836f033a48955796de4d9ffb3b30e297b (patch) | |
tree | a9723c47555e81363ddec7bb1d900d1e609896ae /test/docx | |
parent | f4b86a1bc2c77d50057399f9d93163c2bbc053bd (diff) | |
download | pandoc-d6c58eb836f033a48955796de4d9ffb3b30e297b.tar.gz |
Docx reader: don't strip out empty paragraphs.
We now have the `--strip-empty-paragraphs` option for that,
if you want it. Closes #2252.
Updated docx reader tests.
We use stripEmptyParagraphs to avoid changing too
many tests. We should add new tests for empty paragraphs.
Diffstat (limited to 'test/docx')
-rw-r--r-- | test/docx/0_level_headers.native | 16 | ||||
-rw-r--r-- | test/docx/comments.native | 2 | ||||
-rw-r--r-- | test/docx/drop_cap_nostrip.native | 9 |
3 files changed, 18 insertions, 9 deletions
diff --git a/test/docx/0_level_headers.native b/test/docx/0_level_headers.native index 804ad8732..973f4cfe5 100644 --- a/test/docx/0_level_headers.native +++ b/test/docx/0_level_headers.native @@ -1,15 +1,15 @@ [Table [] [AlignDefault] [0.0] [[]] - [[[]] + [[[Plain []]] ,[[Plain [Str "User\8217s",Space,Str "Guide"]]] - ,[[]] - ,[[]] - ,[[]] + ,[[Plain []]] + ,[[Plain []]] + ,[[Plain []]] ,[[Plain [Str "11",Space,Str "August",Space,Str "2017"]]] - ,[[]] - ,[[]] - ,[[]] - ,[[]]] + ,[[Plain []]] + ,[[Plain []]] + ,[[Plain []]] + ,[[Plain []]]] ,Para [Str "CONTENTS"] ,Para [Strong [Str "Section",Space,Str "Page"]] ,Para [Str "FIGURES",Space,Str "iv"] diff --git a/test/docx/comments.native b/test/docx/comments.native index 3357bc257..8587b54dd 100644 --- a/test/docx/comments.native +++ b/test/docx/comments.native @@ -1,4 +1,4 @@ [Para [Str "I",Space,Str "want",Space,Span ("",["comment-start"],[("id","0"),("author","Jesse Rosenthal"),("date","2016-05-09T16:13:00Z")]) [Str "I",Space,Str "left",Space,Str "a",Space,Str "comment."],Str "some",Space,Str "text",Space,Str "to",Space,Str "have",Space,Str "a",Space,Str "comment",Space,Span ("",["comment-end"],[("id","0")]) [],Str "on",Space,Str "it."] ,Para [Str "This",Space,Str "is",Space,Span ("",["comment-start"],[("id","1"),("author","Jesse Rosenthal"),("date","2016-05-09T16:13:00Z")]) [Str "A",Space,Str "comment",Space,Str "across",Space,Str "paragraphs."],Str "a",Space,Str "new",Space,Str "paragraph."] ,Para [Str "And",Space,Str "so",Span ("",["comment-end"],[("id","1")]) [],Space,Str "is",Space,Str "this."] -,Para [Str "One",Space,Span ("",["comment-start"],[("id","2"),("author","Jesse Rosenthal"),("date","2016-05-09T16:14:00Z")]) [Str "This",Space,Str "one",Space,Str "has",Space,Str "multiple",Space,Str "paragraphs.",Space,Str "\182",Space,Str "See?"],Str "more",Span ("",["comment-end"],[("id","2")]) [],Str ".",Space,Str "And",Space,Str "this",Space,Str "is",Space,Str "one",Space,Str "with",Space,Str "a",Space,Span ("",["comment-start"],[("id","3"),("author","Jesse Rosenthal"),("date","2016-06-22T14:35:00Z")]) [Str "Do",Space,Str "something."],Span ("",["comment-start"],[("id","4"),("author","Jesse Rosenthal"),("date","2016-06-22T14:36:00Z")]) [Str "Do",Space,Str "something",Space,Str "else."],Str "comment",Space,Str "in",Space,Str "a",Space,Str "comment",Span ("",["comment-end"],[("id","3")]) [Span ("",["comment-end"],[("id","4")]) []],Str "."]] +,Para [Str "One",Space,Span ("",["comment-start"],[("id","2"),("author","Jesse Rosenthal"),("date","2016-05-09T16:14:00Z")]) [Str "This",Space,Str "one",Space,Str "has",Space,Str "multiple",Space,Str "paragraphs.",Space,Str "\182",Space,Str "\182",Space,Str "See?"],Str "more",Span ("",["comment-end"],[("id","2")]) [],Str ".",Space,Str "And",Space,Str "this",Space,Str "is",Space,Str "one",Space,Str "with",Space,Str "a",Space,Span ("",["comment-start"],[("id","3"),("author","Jesse Rosenthal"),("date","2016-06-22T14:35:00Z")]) [Str "Do",Space,Str "something."],Span ("",["comment-start"],[("id","4"),("author","Jesse Rosenthal"),("date","2016-06-22T14:36:00Z")]) [Str "Do",Space,Str "something",Space,Str "else."],Str "comment",Space,Str "in",Space,Str "a",Space,Str "comment",Span ("",["comment-end"],[("id","3")]) [Span ("",["comment-end"],[("id","4")]) []],Str "."]] diff --git a/test/docx/drop_cap_nostrip.native b/test/docx/drop_cap_nostrip.native new file mode 100644 index 000000000..ea6a244b5 --- /dev/null +++ b/test/docx/drop_cap_nostrip.native @@ -0,0 +1,9 @@ +[Para [Str "Drop",Space,Str "cap."] +,Para [] +,Para [Str "Next",Space,Str "paragraph."] +,Para [] +,Para [Str "Drop",Space,Str "cap",Space,Str "in",Space,Str "margin."] +,Para [] +,Para [] +,Para [] +,Para [Str "Drop",Space,Str "cap",Space,Str "(not",Space,Str "really)."]] |