summaryrefslogtreecommitdiff
path: root/_extensions
diff options
context:
space:
mode:
Diffstat (limited to '_extensions')
-rw-r--r--_extensions/js/multicol-nohead/multicol-nohead.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/_extensions/js/multicol-nohead/multicol-nohead.lua b/_extensions/js/multicol-nohead/multicol-nohead.lua
index d74e87a..67c2f15 100644
--- a/_extensions/js/multicol-nohead/multicol-nohead.lua
+++ b/_extensions/js/multicol-nohead/multicol-nohead.lua
@@ -31,6 +31,10 @@ local function is_columnar_header(elem)
return elem.t == "Header" and elem.level == 1
end
+local function is_multicols_end(elem)
+ return elem.t == "RawBlock" and elem.text == "\\end{multicols}"
+end
+
-- a standalone image with optional caption that has class .wide
-- TODO: detect pre-quarto-filter pattern too
local function is_wide(elem)
@@ -126,6 +130,8 @@ function Pandoc(doc)
multicol_places[i] = "end"
multicol_now = false
end
+ elseif is_multicols_end(elem) then
+ multicol_now = false
end
end
if multicol_now then