russross / blackfriday

Blackfriday: a markdown processor for Go
Other
5.42k stars 598 forks source link

Support Inline Attribute Lists #566

Open pravin opened 4 years ago

pravin commented 4 years ago

Kramdown and Maruku have the ability to add a class or id to a block. These Inline Attribute Lists can be real handy and allow one to structure code like so,

A simple paragraph with an ID attribute.
{: #para-one}

> A blockquote with a title
{:title="The blockquote title"}
{: #myid}

I'm transitioning a fairly large site from nanoc to hugo and was looking for a solution. Looks like others would like this feature too - https://github.com/gohugoio/hugo/issues/1585

jmafc commented 4 years ago

I'd like this feature too. I have three pages in a Python-Markdown application that use this. Fortunately, two of the pages use it for id attributes in heading elements, so those can be easily edited from {: #anchor} to {#anchor}. But the third page uses it for id attributes for list elements (over 40 of them), which include markdown [Title](url) in almost every one of them, so it won't be easy to reformat them.