mirror of
https://github.com/jgm/pandoc.git
synced 2026-07-11 20:07:22 +00:00
2155b5f9bc
Also, when falling back to a Div with class `figure` for a figure that can't be represented any other way, include a Div with class `caption` containing the caption. Closes #10755.
1.3 KiB
1.3 KiB
% pandoc -f native -t markdown
[ Figure
( "" , [] , [] )
(Caption
Nothing [ Para [ Str "An" , Space , Str "image." ] ])
[ Plain
[ Image
( ""
, []
, []
)
[ Str "An" , Space , Str "image." ]
( "media/rId20.jpg" , "" )
]
]
]
^D

% pandoc -f native -t markdown -t markdown-implicit_figures
[ Figure
( "" , [] , [] )
(Caption
Nothing [ Para [ Str "An" , Space , Str "image." ] ])
[ Plain
[ Image
( ""
, []
, []
)
[ Str "An" , Space , Str "image." ]
( "media/rId20.jpg" , "" )
]
]
]
^D
<figure>
<img src="media/rId20.jpg" alt="An image." />
<figcaption aria-hidden="true"><p>An image.</p></figcaption>
</figure>
% pandoc -f native -t markdown -t markdown-implicit_figures-raw_html
[ Figure
( "" , [] , [] )
(Caption
Nothing [ Para [ Str "An" , Space , Str "image." ] ])
[ Plain
[ Image
( ""
, []
, []
)
[ Str "An" , Space , Str "image." ]
( "media/rId20.jpg" , "" )
]
]
]
^D
:::: figure

::: caption
An image.
:::
::::