Skip to content

Commit f9dfada

Browse files
committed
meta shortcode: read single-item lists as scalars
1 parent 76e1b50 commit f9dfada

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/resources/filters/quarto-pre/shortcodes-handlers.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ function processValue(val, name, t)
179179
return val
180180
elseif pandoc.utils.type(val) == "Blocks" then
181181
return pandoc.utils.blocks_to_inlines(val)
182+
elseif pandoc.utils.type(val) == "List" and #val == 1 then
183+
return processValue(val[1])
182184
else
183185
warn("Unsupported type '" .. pandoc.utils.type(val) .. "' for key " .. name .. " in a " .. t .. " shortcode.")
184186
return { pandoc.Strong({pandoc.Str("?invalid " .. t .. " type:" .. name)}) }

0 commit comments

Comments
 (0)