pandoc/test/command/5321.md
John MacFarlane 38c028bd50 JATS reader: fix parsing of figures.
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.
2019-02-23 15:40:06 -07:00

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:")]]