I had written a blog post using Markdown, that had an image in it like this:
I used Pandoc in Ubuntu 18.04 to convert the Markdown file to HTML. It rendered the image to the
figure tag in HTML like this:
<figure> <img src="foobar.png" /> </figure>
When I used Pandoc in Ubuntu 20.04 it rendered the HTML like this:
<p><img src="foobar.png" /></p>
This was not what I wanted.
It turns out that Ubuntu 18.04 has Pandoc 1.x, while Ubuntu 20.04 has Pandoc 2.5.
Pandoc 184.108.40.206, which was released on 2017-10-30, seems to have this breaking change in its changelog:
Require nonempty alt text for implicit_figures (#2844). A figure with an empty caption doesn’t make sense.
So, to get back to older behavior in Pandoc 2.x, I need to always provide a caption for images, like this:
![Figure of a foobar](foobar.png)