Files
Gokul Rajiv 74add4b126 RST reader: fix figclass and align annotations for figures (#9744)
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.
2024-05-10 15:55:06 -07:00

582 B

% 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" , "" )
        ]
    ]
]