mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-22 07:25:36 +00:00
HTML Reader: parse figure and figcaption (#3813)
This commit is contained in:
committed by
John MacFarlane
parent
f9309bc46e
commit
7d9b782f73
@@ -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")]]
|
||||
```
|
||||
Reference in New Issue
Block a user