File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
src/resources/filters/ast Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -336,16 +336,21 @@ _quarto.ast = {
336336 return
337337 end
338338 local node = node_accessor (table )
339- local t = pandoc .utils .type (value )
340- quarto_assert (t ~= ' Div' and t ~= ' Span' , " " )
339+ local valtype = pandoc .utils .type (value )
340+ quarto_assert (valtype ~= ' Div' and valtype ~= ' Span' , " " )
341341 if index > # node .content then
342342 _quarto .ast .grow_scaffold (node , index )
343343 end
344- local pt = pandoc .utils .type (value )
345- if pt == " Block" or pt == " Inline" then
346- node .content [index ].content = {value }
344+ local inner_node = node .content [index ]
345+ local innertype = pandoc .utils .type (inner_node )
346+ if innertype == ' Block' then
347+ inner_node .content = quarto .utils .as_blocks (value )
348+ elseif innertype == ' Inline' then
349+ inner_node .content = quarto .utils .as_inlines (value )
347350 else
348- node .content [index ].content = value
351+ warn (debug.traceback (
352+ ' Cannot find the right content type for value ' .. valtype ))
353+ inner_node .content = value
349354 end
350355 end
351356 }
You can’t perform that action at this time.
0 commit comments