-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
Discussed in #10447
Originally posted by wlupton December 9, 2024
I have noticed that pandoc.utils.stringify()
can behave differently in pandoc 3.6. Probably it now behaves as documented, and previously was too lax?
The case that I hit was an attempt to stringify a Caption
. Previously this worked but I guess it shouldn't, because you're only supposed to be able to stringify AST elements, and captions are objects with long
(Blocks
) and short
(Inlines
) fields.
However, should the behaviour have changed? I'm not sure.
Here are my tests.
% cat figure.md

% cat caption.lua
function Figure(figure)
local caption = pandoc.utils.stringify(figure.caption)
io.stderr:write(string.format('#### caption = %s\n', caption))
end
% pandoc-3.5 figure.md -L caption.lua -t html -o /dev/null
#### caption = Cat
% pandoc-3.6 figure.md -L caption.lua -t html -o /dev/null
Error running filter caption.lua:
table expected, got Caption
stack traceback:
caption.lua:2: in function 'Figure'</div>
Metadata
Metadata
Assignees
Labels
No labels