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 274 forks source link

Block IAL for Standalone Images #668

Closed tyehle closed 3 years ago

tyehle commented 4 years ago

Only the good parts from #667.

This changes the behavior of a standalone image with a block IAL:

![alt text](some.jpg){: standalone #id .class attr="value"}
{: #figure-id .figure-class figure-attr="value"}

The current implementation drops any attributes on the block and copies #id and .class attributes from the image to the <figure>.

With this change if there is an #id or .class on the block the annotations on the image remain with the image, and all block annotations are always copied to the <figure> instead of being deleted.

tyehle commented 4 years ago

@gettalong In #667 you mentioned you would be interested in a change like this.

gettalong commented 4 years ago

@tyehle Yes, thank you - I will have a look at it when I have some time!

gettalong commented 3 years ago

@tyehle Thank you for your contribution. This will be in the next release.