aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Shared.hs4
-rw-r--r--test/command/make-section-column-divs.md28
2 files changed, 31 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs
index 926116e23..efb2e56dd 100644
--- a/src/Text/Pandoc/Shared.hs
+++ b/src/Text/Pandoc/Shared.hs
@@ -586,7 +586,9 @@ makeSections numbering mbBaseLevel bs =
(Header level (ident,classes,kvs) title':ys) : xs)
| all (\case
Header level' _ _ -> level' > level
- _ -> True) ys = do
+ _ -> True) ys
+ , "column" `notElem` dclasses
+ , "columns" `notElem` dclasses = do
inner <- go (Header level (ident,classes,kvs) title':ys)
let inner' =
case inner of
diff --git a/test/command/make-section-column-divs.md b/test/command/make-section-column-divs.md
new file mode 100644
index 000000000..0e8548233
--- /dev/null
+++ b/test/command/make-section-column-divs.md
@@ -0,0 +1,28 @@
+For reference see
+https://groups.google.com/d/msgid/pandoc-discuss/cef24253-7731-417c-a1ee-48153c4344bf%40googlegroups.com
+
+```
+% pandoc
+::: columns
+::: column
+# A
+
+a
+:::
+::: column
+# B
+
+b
+:::
+:::
+^D
+<div class="columns">
+<div class="column">
+<h1 id="a">A</h1>
+<p>a</p>
+</div><div class="column">
+<h1 id="b">B</h1>
+<p>b</p>
+</div>
+</div>
+```