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.
12 lines
674 B
Text
12 lines
674 B
Text
[Header 1 ("slide-1",[],[]) [Str "Slide",Space,Str "1"]
|
|
,Div ("",["columns"],[])
|
|
[Div ("",["column"],[])
|
|
[Para [Image ("",[],[]) [Str "an",Space,Str "image"] ("lalune.jpg","fig:")]]
|
|
,Div ("",["column"],[])
|
|
[Para [Str "This",Space,Str "should",Space,Str "use",Space,Str "Two",Space,Str "Content,",Space,Emph [Str "not"],Space,Str "Comparison!"]]]
|
|
,Header 1 ("slide-2",[],[]) [Str "Slide",Space,Str "2"]
|
|
,Div ("",["columns"],[])
|
|
[Div ("",["column"],[])
|
|
[Para [Str "This",Space,Str "should",Space,Str "also",Space,Str "use",Space,Str "Two",Space,Str "Content"]]
|
|
,Div ("",["column"],[])
|
|
[Para [Image ("",[],[]) [Str "an",Space,Str "image"] ("lalune.jpg","fig:")]]]]
|