Files
John MacFarlane 9c36d884d5 RST reader: parse :alt: on figure.
Also give a better default if `alt` is not specified, using
the stringified caption rather than the filename.

Partially addresses #11140.

Add failing test case for Markdown writer issue in #11140.
2025-09-15 10:50:04 +02:00

721 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 "This"
            , Space
            , Str "is"
            , Space
            , Str "a"
            , Space
            , Str "caption."
            ]
            ( "example.png" , "" )
        ]
    ]
]