diff options
| author | John MacFarlane <[email protected]> | 2025-04-04 10:16:23 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2025-04-04 10:16:23 -0700 |
| commit | 2155b5f9bc5a08fa1044f8a7ba75ce40af630fb7 (patch) | |
| tree | 2fc63d4e8bea4d9e7769d8713e19e8150ddf7ab9 /test | |
| parent | 84946bf819a373527f03b5f4091ca0bbe695aaa0 (diff) | |
Markdown writer: render a figure with Para caption as implicit figure.
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.
Diffstat (limited to 'test')
| -rw-r--r-- | test/command/10755.md | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/test/command/10755.md b/test/command/10755.md new file mode 100644 index 000000000..5a603cdfc --- /dev/null +++ b/test/command/10755.md @@ -0,0 +1,71 @@ +``` +% 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. +::: +:::: +``` |
