Skip to content

Commit c16212c

Browse files
committed
Improve handling of empty theorems
Ensure this document will properly render (not empty theorem) ``` You can use @exm-boids to explore how these three rules influence the simulated flocking behaviour in birds. :::{#exm-boids} #### Explore flocking behaviour ::: ```` Fixes #2354
1 parent 537c06a commit c16212c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/resources/filters/crossref/theorems.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,12 @@ function theorems()
7676
table.insert(prefix, pandoc.Str(")"))
7777
table.insert(prefix, pandoc.Space())
7878
end
79-
79+
80+
-- If this theorem has no content, then create a placeholder
81+
if #el.content == 0 then
82+
el.content[1] = pandoc.Para({})
83+
end
84+
8085
-- prepend the prefix
8186
local caption = el.content[1]
8287
tprepend(caption.content, {

0 commit comments

Comments
 (0)