aboutsummaryrefslogtreecommitdiff
path: root/test/pptx/two-column/all-text
diff options
context:
space:
mode:
authorEmily Bourke <undergroundquizscene@protonmail.com>2021-09-08 14:05:22 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2021-09-13 08:30:36 -0700
commit0ebe65e651766a2b3d006d3dee4afdfd43a386d5 (patch)
tree55bf6ebc804e6fca086c2318b38af66b6ecdfa84 /test/pptx/two-column/all-text
parent6271b09c50444b107d8595f553700fa382718246 (diff)
downloadpandoc-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/pptx/two-column/all-text')
-rw-r--r--test/pptx/two-column/all-text/deleted-layouts.pptxbin0 -> 30568 bytes
-rw-r--r--test/pptx/two-column/all-text/input.native9
-rw-r--r--test/pptx/two-column/all-text/moved-layouts.pptxbin0 -> 41256 bytes
-rw-r--r--test/pptx/two-column/all-text/output.pptxbin0 -> 27689 bytes
-rw-r--r--test/pptx/two-column/all-text/templated.pptxbin0 -> 40756 bytes
5 files changed, 9 insertions, 0 deletions
diff --git a/test/pptx/two-column/all-text/deleted-layouts.pptx b/test/pptx/two-column/all-text/deleted-layouts.pptx
new file mode 100644
index 000000000..1d7bd87d3
--- /dev/null
+++ b/test/pptx/two-column/all-text/deleted-layouts.pptx
Binary files differ
diff --git a/test/pptx/two-column/all-text/input.native b/test/pptx/two-column/all-text/input.native
new file mode 100644
index 000000000..086f74889
--- /dev/null
+++ b/test/pptx/two-column/all-text/input.native
@@ -0,0 +1,9 @@
+Pandoc (Meta {unMeta = fromList []})
+[Header 1 ("two-column-layout",[],[]) [Str "Two-Column",Space,Str "Layout"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Str "One",Space,Str "paragraph."]
+ ,Para [Str "Another",Space,Str "paragraph."]]
+ ,Div ("",["column"],[])
+ [Para [Str "Second",Space,Str "column",Space,Str "paragraph."]
+ ,Para [Str "Another",Space,Str "second",Space,Str "paragraph."]]]]
diff --git a/test/pptx/two-column/all-text/moved-layouts.pptx b/test/pptx/two-column/all-text/moved-layouts.pptx
new file mode 100644
index 000000000..71760268c
--- /dev/null
+++ b/test/pptx/two-column/all-text/moved-layouts.pptx
Binary files differ
diff --git a/test/pptx/two-column/all-text/output.pptx b/test/pptx/two-column/all-text/output.pptx
new file mode 100644
index 000000000..396dc2a74
--- /dev/null
+++ b/test/pptx/two-column/all-text/output.pptx
Binary files differ
diff --git a/test/pptx/two-column/all-text/templated.pptx b/test/pptx/two-column/all-text/templated.pptx
new file mode 100644
index 000000000..8901695b1
--- /dev/null
+++ b/test/pptx/two-column/all-text/templated.pptx
Binary files differ