loading...

re: Create a blog with Markdown & Sapper VIEW POST

FULL DISCUSSION
 

This helped me! Do you know a way to wrap images from markdown in figure, not 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.

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.

code of conduct - report abuse