This helped me! Do you know a way to wrap images from markdown in figure, not p?
figure
p
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.
<figure>
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 ...
Welcome.
Try forking the markdown rollup plugin and switching showdown to markdown-it. That should do it.
showdown
markdown-it
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This helped me! Do you know a way to wrap images from markdown in
figure
, notp
?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 thep
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 ...
Welcome.
Try forking the markdown rollup plugin and switching
showdown
tomarkdown-it
. That should do it.