Skip to content

Commit

Permalink
Rely less on pandoc's type implicit conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
tarleb committed Oct 24, 2024
1 parent dbb697c commit 997e3f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/resources/filters/ast/customnodes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,10 @@ _quarto.ast = {
_quarto.ast.grow_scaffold(node, index)
end
local pt = pandoc.utils.type(value)
if pt == "Block" or pt == "Inline" then
node.content[index].content = {value}
if pt == "Block" then
node.content[index].content = pandoc.Blocks{value}
elseif pt == "Inline" then
node.content[index].content = pandoc.Inlines{value}
else
node.content[index].content = value
end
Expand Down
2 changes: 1 addition & 1 deletion src/resources/filters/quarto-pre/code-annotation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ function code_annotations()
-- if code annotations is false, then shut it down
if codeAnnotations ~= false then

local outputs = pandoc.List()
local outputs = pandoc.Blocks{}

-- annotations[annotation-number] = {list of line numbers}
local pendingAnnotations = nil
Expand Down

0 comments on commit 997e3f8

Please sign in to comment.