Fixes #7473 Previously, `figclass`es weren't being extracted correctly. `figclass` and `align` annotations are now implemented following the rst docs: these options apply to the figure while other options are passed onto the underlying image.
33 lines
582 B
Markdown
33 lines
582 B
Markdown
```
|
|
% pandoc -f rst -t native
|
|
.. figure:: example.png
|
|
:figclass: foo bar
|
|
:align: right
|
|
:width: 1in
|
|
|
|
This is a caption.
|
|
^D
|
|
[ Figure
|
|
( "" , [ "foo" , "bar" , "align-right" ] , [] )
|
|
(Caption
|
|
Nothing
|
|
[ Plain
|
|
[ Str "This"
|
|
, Space
|
|
, Str "is"
|
|
, Space
|
|
, Str "a"
|
|
, Space
|
|
, Str "caption."
|
|
]
|
|
])
|
|
[ Plain
|
|
[ Image
|
|
( "" , [] , [ ( "width" , "1in" ) ] )
|
|
[ Str "example.png" ]
|
|
( "example.png" , "" )
|
|
]
|
|
]
|
|
]
|
|
```
|