aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMauro Bieg <mb21@users.noreply.github.com>2017-07-22 19:22:56 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-07-22 19:22:56 +0200
commit7d9b782f73edfc49fbe6f0c3d6ce61328811cbc7 (patch)
tree84ad99c7d032c79e779273a5fd93e54185e9d846 /test
parentf9309bc46e4bf24b3a1d53663297851394a89a3f (diff)
downloadpandoc-7d9b782f73edfc49fbe6f0c3d6ce61328811cbc7.tar.gz
HTML Reader: parse figure and figcaption (#3813)
Diffstat (limited to 'test')
-rw-r--r--test/command/html-read-figure.md45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/command/html-read-figure.md b/test/command/html-read-figure.md
new file mode 100644
index 000000000..9c604c706
--- /dev/null
+++ b/test/command/html-read-figure.md
@@ -0,0 +1,45 @@
+```
+% pandoc -f html -t native
+<figure>
+ <img src="foo.png" title="voyage">
+ <figcaption>bar</figcaption>
+</figure>
+^D
+[Para [Image ("",[],[]) [Str "bar"] ("foo.png","fig:voyage")]]
+```
+
+```
+% pandoc -f html -t native
+<figure>
+ <figcaption>bar</figcaption>
+ <img src="foo.png" title="voyage">
+</figure>
+^D
+[Para [Image ("",[],[]) [Str "bar"] ("foo.png","fig:voyage")]]
+```
+
+```
+% pandoc -f html -t native
+<figure>
+ <img src="foo.png" title="voyage">
+</figure>
+^D
+[Para [Image ("",[],[]) [] ("foo.png","fig:voyage")]]
+```
+
+```
+% pandoc -f html -t native
+<figure>
+ <p><img src="foo.png" title="voyage"></p>
+ <figcaption>bar</figcaption>
+</figure>
+^D
+[Para [Image ("",[],[]) [Str "bar"] ("foo.png","fig:voyage")]]
+```
+
+```
+% pandoc -f html -t native
+<figure><img src="foo.png" title="voyage" alt="this is ignored"><figcaption>bar <strong>baz</strong></figcaption></figure>
+^D
+[Para [Image ("",[],[]) [Str "bar",Space,Strong [Str "baz"]] ("foo.png","fig:voyage")]]
+```