-- dtext shortcode function dtext(args, kwargs, meta) local function buildDetails(text, summary, open) local details = { '
',
'' .. summary .. '
',
'' .. text .. '
',
'
',
'' .. summary .. '
',
''
}
return table.concat(details, "")
end
local summary = (#kwargs["summary"] > 0) and kwargs["summary"] or "Details"
local open = ""
if table.concat(args, " "):find("open") then
open = " open"
end
local output = buildDetails(summary, open)
if quarto.doc.isFormat("html:js") then
return pandoc.RawInline('html', output)
else
return pandoc.Null()
end
end
-- dstop shortcode
function dstop(args, kwargs, meta)
local output = table.concat({'
', '