File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
src/resources/filters/customnodes Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,22 @@ _quarto.ast.add_handler({
103103 return listingDiv
104104 end
105105 return el
106+ elseif _quarto .format .isMarkdownOutput () then
107+ -- see https://github.com/quarto-dev/quarto-cli/issues/5112
108+ --
109+ -- This is a narrow fix for the 1.3 regression.
110+ -- We still don't support listings output in markdown since that wasn't supported in 1.2 either.
111+ -- But that'll be done in 1.4 with crossrefs overhaul.
112+
113+ if node .filename then
114+ -- if we have a filename, add it as a header
115+ return pandoc .Div (
116+ { pandoc .Plain {pandoc .Strong {pandoc .Str (node .filename )}}, el },
117+ pandoc .Attr (" " , {" code-with-filename" })
118+ )
119+ else
120+ return el
121+ end
106122 else
107123 -- return the code block unadorned
108124 -- this probably could be improved
@@ -111,10 +127,15 @@ _quarto.ast.add_handler({
111127 end ,
112128
113129 inner_content = function (extended_node )
114- return {}
130+ return {
131+ code_block = extended_node .code_block
132+ }
115133 end ,
116134
117135 set_inner_content = function (extended_node , values )
136+ if values .code_block ~= nil then
137+ extended_node .code_block = values .code_block
138+ end
118139 return extended_node
119140 end ,
120141
You can’t perform that action at this time.
0 commit comments