From 2155b5f9bc5a08fa1044f8a7ba75ce40af630fb7 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 4 Apr 2025 10:16:23 -0700 Subject: 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. --- test/command/10755.md | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 test/command/10755.md (limited to 'test') 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 +![An image.](media/rId20.jpg) +``` + +``` +% 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 +
+An image. + +
+``` + +``` +% 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 +![An image.](media/rId20.jpg) + +::: caption +An image. +::: +:::: +``` -- cgit v1.2.3