diff options
author | Emily Bourke <undergroundquizscene@protonmail.com> | 2021-09-08 14:05:22 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-09-13 08:30:36 -0700 |
commit | 0ebe65e651766a2b3d006d3dee4afdfd43a386d5 (patch) | |
tree | 55bf6ebc804e6fca086c2318b38af66b6ecdfa84 /test/Tests/Writers | |
parent | 6271b09c50444b107d8595f553700fa382718246 (diff) | |
download | pandoc-0ebe65e651766a2b3d006d3dee4afdfd43a386d5.tar.gz |
pptx: Fix logic for choosing Comparison layout
There was a mistake in the logic used to choose between the Comparison
and Two Content layouts: if one column contained only non-text (an image
or a table) and the other contained only text, the Comparison layout was
chosen instead of the desired Two Content layout.
This commit fixes that logic:
> If either column contains text followed by non-text, use Comparison.
Otherwise, use Two Content.
It also adds a test asserting this behaviour.
Diffstat (limited to 'test/Tests/Writers')
-rw-r--r-- | test/Tests/Writers/Powerpoint.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/Tests/Writers/Powerpoint.hs b/test/Tests/Writers/Powerpoint.hs index 256ee1f7f..dd3846fef 100644 --- a/test/Tests/Writers/Powerpoint.hs +++ b/test/Tests/Writers/Powerpoint.hs @@ -103,8 +103,12 @@ tests = groupPptxTests [ pptxTests "Inline formatting" "pptx/images/output.pptx" , pptxTests "two-column layout" def - "pptx/two-column/input.native" - "pptx/two-column/output.pptx" + "pptx/two-column/all-text/input.native" + "pptx/two-column/all-text/output.pptx" + , pptxTests "two-column (not comparison)" + def + "pptx/two-column/text-and-image/input.native" + "pptx/two-column/text-and-image/output.pptx" , pptxTests "speaker notes" def "pptx/speaker-notes/input.native" |