mirror of
https://github.com/jgm/pandoc.git
synced 2026-07-12 12:27:21 +00:00
fa3513b104
Previously we were looking for an attribute that doesn't exist in JATS; alt-text is provided by a child element. Closes #9130.
751 B
751 B
% pandoc -f jats -t native
<fig id="fig-1">
<caption>
<p>bar</p>
</caption>
<graphic xlink:href="foo.png">
<alt-text>baz</alt-text>
</graphic>
</fig>
^D
[ Figure
( "fig-1" , [] , [] )
(Caption Nothing [ Plain [ Str "bar" ] ])
[ Para
[ Image ( "" , [] , [] ) [ Str "baz" ] ( "foo.png" , "" ) ]
]
]
% pandoc -f jats -t native
<fig id="fig-1">
<caption>
<title>foo</title>
<p>bar</p>
</caption>
<graphic xlink:href="foo.png">
<alt-text>baz</alt-text>
</graphic>
</fig>
^D
[ Figure
( "fig-1" , [] , [] )
(Caption
Nothing [ Plain [ Str "foo" , LineBreak , Str "bar" ] ])
[ Para
[ Image ( "" , [] , [] ) [ Str "baz" ] ( "foo.png" , "" ) ]
]
]