Skip to content

Commit 3bbb5dc

Browse files
committed
fix: prevent infinite recursion in Typst table processing
1 parent 6a3445f commit 3bbb5dc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/resources/filters/quarto-post/typst.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,15 @@ function render_typst_fixups()
120120
return div
121121
end,
122122
Table = function(tbl)
123-
-- https://github.com/quarto-dev/quarto-cli/issues/10438
123+
-- Check if table has already been processed
124+
if tbl.classes:includes("typst-processed") then
125+
return tbl
126+
end
127+
128+
-- Mark table as processed and add no-figure class
129+
tbl.classes:insert("typst-processed")
124130
tbl.classes:insert("typst:no-figure")
131+
125132
return pandoc.Div({
126133
pandoc.RawBlock("typst", "#["),
127134
tbl,

0 commit comments

Comments
 (0)