Skip to content

Commit fd2a82e

Browse files
mwild1iNPUTmice
authored andcommitted
tools/2xep: Support for captions in examples
1 parent a1e4c74 commit fd2a82e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/2xep.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ end
318318

319319
function CodeBlock(s, attr)
320320
if attr and attr.class and (has(attr.class, "example") or has(attr.class, "xml")) then
321-
return "<example><![CDATA[".. s .. "]]></example>"
321+
return "<example "..attributes({ caption = attr.caption }).."><![CDATA[".. s .. "]]></example>"
322322
else
323323
return "<code><![CDATA[".. s .. "]]></code>"
324324
end

0 commit comments

Comments
 (0)