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

`markdown="0"` meaning #792

Closed EtienneMiret closed 1 week ago

EtienneMiret commented 1 year ago

The kramdown documentation states:

If an HTML tag has an attribute markdown="0", then the tag is parsed as raw HTML block.

However, the below text:

<img markdown="0" alt="" src="images/foo"/>

is translated to:

<p><img alt="" src="images/foo" /></p>

The spurious p element makes me believe my <img/> tag was parsed as span level, not block level.

I guess that’s a documentation bug. Given the other markdown attribute values relates to how the content of a tag is parsed, not how the tag itself is parsed, I guess the intended meaning of markdown="0" is in fact:

If an HTML tag has an attribute markdown="0", then the content of the the tag is parsed as raw HTML.

gettalong commented 1 year ago

Yes, this refers to the content of the tag. I have adapted the wording in the spec. Thank you!