diff options
author | Emily Bourke <undergroundquizscene@protonmail.com> | 2021-09-17 16:05:06 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-10-17 17:24:30 -0700 |
commit | 8af15ab345bb0790cc3442722673d9da9f23a79c (patch) | |
tree | 573a438aa9d684178aabc3666e755862cd031beb /test | |
parent | 3f489bcb5897898d453bef549d6eba5f5d2120bf (diff) | |
download | pandoc-8af15ab345bb0790cc3442722673d9da9f23a79c.tar.gz |
pptx: Fix list level numbering
In PowerPoint, the content of a top-level list is at the same level as
the content of a top-level paragraph – the only difference is that a
list style has been applied.
At the moment, the pptx writer increments the paragraph level on each
list, turning what should be top-level lists into second-level lists.
This commit changes that logic, only incrementing the paragraph level on
continuation paragraphs of lists.
- Fixes https://github.com/jgm/pandoc/issues/4828
- Fixes https://github.com/jgm/pandoc/issues/4663
Diffstat (limited to 'test')
22 files changed, 24 insertions, 0 deletions
diff --git a/test/Tests/Writers/Powerpoint.hs b/test/Tests/Writers/Powerpoint.hs index 84bdd7476..f3663efbb 100644 --- a/test/Tests/Writers/Powerpoint.hs +++ b/test/Tests/Writers/Powerpoint.hs @@ -66,6 +66,10 @@ tests = let def "pptx/start-numbering-at/input.native" "pptx/start-numbering-at/output.pptx" + , pptxTests "List continuation paragraph indentation" + def + "pptx/list-level/input.native" + "pptx/list-level/output.pptx" , pptxTests "tables" def "pptx/tables/input.native" diff --git a/test/pptx/code-custom/output.pptx b/test/pptx/code-custom/output.pptx Binary files differindex ded8f1125..6c7a1a9ab 100644 --- a/test/pptx/code-custom/output.pptx +++ b/test/pptx/code-custom/output.pptx diff --git a/test/pptx/code-custom/templated.pptx b/test/pptx/code-custom/templated.pptx Binary files differindex 8bb0df1ff..116865c1f 100644 --- a/test/pptx/code-custom/templated.pptx +++ b/test/pptx/code-custom/templated.pptx diff --git a/test/pptx/code/output.pptx b/test/pptx/code/output.pptx Binary files differindex e700bc268..8fd00ff74 100644 --- a/test/pptx/code/output.pptx +++ b/test/pptx/code/output.pptx diff --git a/test/pptx/code/templated.pptx b/test/pptx/code/templated.pptx Binary files differindex 44f34cd64..0d7db048f 100644 --- a/test/pptx/code/templated.pptx +++ b/test/pptx/code/templated.pptx diff --git a/test/pptx/incremental-lists/with-flag/output.pptx b/test/pptx/incremental-lists/with-flag/output.pptx Binary files differindex 1ca1dbf17..82f5f926f 100644 --- a/test/pptx/incremental-lists/with-flag/output.pptx +++ b/test/pptx/incremental-lists/with-flag/output.pptx diff --git a/test/pptx/incremental-lists/with-flag/templated.pptx b/test/pptx/incremental-lists/with-flag/templated.pptx Binary files differindex 4ddf6bb75..e8482b25f 100644 --- a/test/pptx/incremental-lists/with-flag/templated.pptx +++ b/test/pptx/incremental-lists/with-flag/templated.pptx diff --git a/test/pptx/incremental-lists/without-flag/output.pptx b/test/pptx/incremental-lists/without-flag/output.pptx Binary files differindex 6f7261ba3..62e66e1fe 100644 --- a/test/pptx/incremental-lists/without-flag/output.pptx +++ b/test/pptx/incremental-lists/without-flag/output.pptx diff --git a/test/pptx/incremental-lists/without-flag/templated.pptx b/test/pptx/incremental-lists/without-flag/templated.pptx Binary files differindex ca5c9fdab..ac7be9564 100644 --- a/test/pptx/incremental-lists/without-flag/templated.pptx +++ b/test/pptx/incremental-lists/without-flag/templated.pptx diff --git a/test/pptx/list-level/input.native b/test/pptx/list-level/input.native new file mode 100644 index 000000000..e0b36b8e5 --- /dev/null +++ b/test/pptx/list-level/input.native @@ -0,0 +1,20 @@ +[Header 1 ("slide",[],[]) [Str "Slide"] +,BulletList + [[Para [Str "Top-level"] + ,Para [Str "With",Space,Str "continuation",Space,Str "paragraph"]] + ,[Para [Str "Then:"] + ,BulletList + [[Plain [Str "nested"]] + ,[Plain [Str "list"]] + ,[Plain [Str "items"]]]]] +,Header 1 ("slide-1",[],[]) [Str "Slide"] +,Para [Str "Paragraph."] +,OrderedList (1,Decimal,Period) + [[Para [Str "Top-level"] + ,Para [Str "Continuation"] + ,OrderedList (1,Decimal,Period) + [[Para [Str "Sub-list"] + ,Para [Str "With",Space,Str "Continuation"]] + ,[Para [Str "(still",Space,Str "sub-list)"]]]] + ,[Para [Str "(back",Space,Str "to",Space,Str "top-level)"]]] +,Para [Str "Paragraph."]] diff --git a/test/pptx/list-level/output.pptx b/test/pptx/list-level/output.pptx Binary files differnew file mode 100644 index 000000000..5e3506958 --- /dev/null +++ b/test/pptx/list-level/output.pptx diff --git a/test/pptx/list-level/templated.pptx b/test/pptx/list-level/templated.pptx Binary files differnew file mode 100644 index 000000000..8853a3082 --- /dev/null +++ b/test/pptx/list-level/templated.pptx diff --git a/test/pptx/lists/output.pptx b/test/pptx/lists/output.pptx Binary files differindex 94a424f42..e23f47218 100644 --- a/test/pptx/lists/output.pptx +++ b/test/pptx/lists/output.pptx diff --git a/test/pptx/lists/templated.pptx b/test/pptx/lists/templated.pptx Binary files differindex 52097489f..290b5b519 100644 --- a/test/pptx/lists/templated.pptx +++ b/test/pptx/lists/templated.pptx diff --git a/test/pptx/pauses/without-incremental/output.pptx b/test/pptx/pauses/without-incremental/output.pptx Binary files differnew file mode 100644 index 000000000..9085db330 --- /dev/null +++ b/test/pptx/pauses/without-incremental/output.pptx diff --git a/test/pptx/pauses/without-incremental/templated.pptx b/test/pptx/pauses/without-incremental/templated.pptx Binary files differnew file mode 100644 index 000000000..6662e2451 --- /dev/null +++ b/test/pptx/pauses/without-incremental/templated.pptx diff --git a/test/pptx/slide-breaks-toc/output.pptx b/test/pptx/slide-breaks-toc/output.pptx Binary files differindex 788cdf148..f2660ef93 100644 --- a/test/pptx/slide-breaks-toc/output.pptx +++ b/test/pptx/slide-breaks-toc/output.pptx diff --git a/test/pptx/slide-breaks-toc/templated.pptx b/test/pptx/slide-breaks-toc/templated.pptx Binary files differindex d11744079..0a2bdb857 100644 --- a/test/pptx/slide-breaks-toc/templated.pptx +++ b/test/pptx/slide-breaks-toc/templated.pptx diff --git a/test/pptx/speaker-notes-afterseps/output.pptx b/test/pptx/speaker-notes-afterseps/output.pptx Binary files differindex 99110d3ca..b54ba4465 100644 --- a/test/pptx/speaker-notes-afterseps/output.pptx +++ b/test/pptx/speaker-notes-afterseps/output.pptx diff --git a/test/pptx/speaker-notes-afterseps/templated.pptx b/test/pptx/speaker-notes-afterseps/templated.pptx Binary files differindex daf8e2175..3b272ab1b 100644 --- a/test/pptx/speaker-notes-afterseps/templated.pptx +++ b/test/pptx/speaker-notes-afterseps/templated.pptx diff --git a/test/pptx/start-numbering-at/output.pptx b/test/pptx/start-numbering-at/output.pptx Binary files differindex bc74ec599..ecfc6901a 100644 --- a/test/pptx/start-numbering-at/output.pptx +++ b/test/pptx/start-numbering-at/output.pptx diff --git a/test/pptx/start-numbering-at/templated.pptx b/test/pptx/start-numbering-at/templated.pptx Binary files differindex 4f191a06e..f3f46ef30 100644 --- a/test/pptx/start-numbering-at/templated.pptx +++ b/test/pptx/start-numbering-at/templated.pptx |