jgarber / redcloth

RedCloth is a Ruby library for converting Textile into HTML.
Other
445 stars 102 forks source link

Support for html attributes #52

Open egze opened 6 years ago

egze commented 6 years ago

Hi,

We stumbled upon an issue in our app where the html generated by RedCloth needs to be SEO friendly. For example we need the rel="nofollow" or target="_blank".

Do you see any way how we can have it without using raw html? Maybe we can add some generic syntax for html attributes? I'll be happy to try a PR if you point me to the right direction.

Something like:

"!rel: 'nofollow'; target: '_blank'!RedCloth":https://github.com/jgarber/redcloth/issues/new

Would output:

<a rel="nofollow" target="_blank" href="https://github.com/jgarber/redcloth/issues/new">RedCloth</a>