File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -317,6 +317,17 @@ function CodeBlock(block)
317
317
if block .attributes [" name" ] then
318
318
imgObj .attributes [" name" ] = block .attributes [" name" ]
319
319
end
320
+
321
+ -- Transfer the identifier from the code block to the new image block
322
+ -- to enable downstream filters like pandoc-crossref. This allows a figure
323
+ -- block starting with:
324
+ --
325
+ -- ```{#fig:pumlExample .plantuml caption="This is an image, created by **PlantUML**."}
326
+ --
327
+ -- to be referenced as @fig:pumlExample outside of the figure.
328
+ if block .identifier then
329
+ imgObj .identifier = block .identifier
330
+ end
320
331
321
332
-- Finally, put the image inside an empty paragraph. By returning the
322
333
-- resulting paragraph object, the source code block gets replaced by
You can’t perform that action at this time.
0 commit comments