aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-02-23 15:40:06 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-02-23 15:40:06 -0700
commit38c028bd50fc3781e69370864f163f8d33fd481f (patch)
treec155aad5c0d54b3a06ffe723c57f18cfae463ce6 /test
parentc75b558cbc2d21cdc4f5fa243b5f900ca7e83bbc (diff)
downloadpandoc-38c028bd50fc3781e69370864f163f8d33fd481f.tar.gz
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.
Diffstat (limited to 'test')
-rw-r--r--test/command/5321.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/command/5321.md b/test/command/5321.md
new file mode 100644
index 000000000..081abe2a0
--- /dev/null
+++ b/test/command/5321.md
@@ -0,0 +1,24 @@
+```
+% 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:")]]
+```