Files
pandoc/test/command/figures-rst.md
John MacFarlane 29c5afb305 RST writer: fix figure handling.
This fixes a number of regressions from pandoc 2.x.

Properly handle caption, alt attribute in figures.

No longer treat a paragraph with a single image in it as a figure
(we have a dedicated Figure element now).

Closes #8930, closes #8871.
2023-07-12 09:13:32 -07:00

14 lines
264 B
Markdown

Figure float with caption at the figure level.
```
% pandoc -f native -t rst
[Figure ("fig-id",[],[]) (Caption Nothing [Para [Str "Caption"]]) [Para [Image ("",[],[]) [] ("foo.png", "fig:")]]]
^D
.. figure:: foo.png
name: fig-id
:alt: fig:
Caption
```