kramdown
kramdown copied to clipboard
typographic quote causes IAL attribute to be silently ignored
$ kramdown
`text`{: id="bar" style="foo"}
➔
<p><code id="bar" style="foo">text</code></p>
$ kramdown
`text`{: id="bar" style="foo“}
➔
<p><code id="bar">text</code></p>
because...
$ kramdown
`text`{: id="bar" style="foo}
➔
<p><code id="bar">text</code></p>
Of course the second and third examples are wrong, but I think silently ignoring the abrupt end of the IAL is wrong. At least it confuses kramdown-rfc users, who are liable to get typographic quotes from copy/paste from documents. Note that there is an error message in a simplified case:
$ kramdown
`text`{: style="foo}
➔
<p><code>text</code></p>
Warning: No or invalid attributes found in IAL/ALD content: style="foo
As per the spec everything that can not be correctly matched is ignored. However, I agree that a warning might be warranted for cases where an ignored part looks like the start of a key-value pair.