gettalong / kramdown

kramdown is a fast, pure Ruby Markdown superset converter, using a strict syntax definition and supporting several common extensions.
http://kramdown.gettalong.org
Other
1.72k stars 275 forks source link

How to create a standalone image? #724

Closed docsimpo closed 3 years ago

docsimpo commented 3 years ago

The documentation says,

By assigning the reference name “standalone” to an image that is the sole content of a paragraph, the image will be rendered inside a <figure> element instead of an image inside a paragraph.

How to assign a reference name to an image? I tried several ways, but none of them create a <figure> element wrapping the image.

gettalong commented 3 years ago

Use the following:

![alt text](image.jpg)
{:standalone}