38c028bd50
This ensures that a figure containing a single image is parsed as a pandoc "implicit figure" (i.e., a Para with a single Image whose title attribute begins with `fig:`). More complex figures will still be parsed as divs. Closes #5321.
480 B
480 B
% pandoc -f jats -t native
<fig id="fig-1">
<caption>
<p>bar</p>
</caption>
<graphic xlink:href="foo.png" xlink:alt-text="baz">
</fig>
^D
[Para [Image ("fig-1",[],[]) [Str "bar"] ("foo.png","fig:")]]
% pandoc -f jats -t native
<fig id="fig-1">
<caption>
<title>foo</title>
<p>bar</p>
</caption>
<graphic xlink:href="foo.png" xlink:alt-text="baz">
</fig>
^D
[Para [Image ("fig-1",[],[]) [Str "foo",LineBreak,Str "bar"] ("foo.png","fig:")]]