Glad it helped :)
I think the p tag comes from having an empty line before defining the image. It's not the image that causes the p tag.
One workaround is to <figure> tag inside markdown. HTML tags are allowed in markdown.
Otherwise you'll have to look at modifying the markdown parser, or finding one that has a configurable option for this.
Well the p tag will wrap either only the image, or the image and other inline elements.
Thanks. I was guessing I had to find another parser. markdown-it seems like the most active -- plugin wise ...
Try forking the markdown rollup plugin and switching showdown to markdown-it. That should do it.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.