File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/resources/filters/quarto-post Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,8 @@ function fold_code_and_lift_codeblocks()
7777 end ,
7878 CodeBlock = function (block )
7979 local folded_block , did_fold = render_folded_block (block )
80- if did_fold then
80+ local need_to_lift = did_fold or block .classes :includes (" code-annotation-code" )
81+ if need_to_lift then
8182 folded_block = make_scaffold (pandoc .Div , { folded_block } )
8283 end
8384 if block .classes :includes (" code-annotation-code" ) then
@@ -86,11 +87,10 @@ function fold_code_and_lift_codeblocks()
8687 else
8788 prev_annotated_code_block_scaffold = nil
8889 end
89- if did_fold then
90+ if need_to_lift then
9091 blocks :insert (folded_block )
9192 return {}
9293 else
93- prev_annotated_code_block_scaffold = nil
9494 return nil
9595 end
9696 end ,
@@ -109,6 +109,7 @@ function fold_code_and_lift_codeblocks()
109109 })
110110 if need_to_move_dl then
111111 assert (prev_annotated_code_block_scaffold )
112+ print (prev_annotated_code_block_scaffold )
112113 prev_annotated_code_block_scaffold .content :insert (div )
113114 return {}
114115 end
You can’t perform that action at this time.
0 commit comments