You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's exactly as CommonMark specification requests, I believe. As such, all compliant implementations won't recognize it.
Generally, the raw HTML support in Markdown/Commonmark is simplified.
Also, I'm not expert in this, but it's more XML rather than HTML thing, isn't it? But I admit, allowing XML tags might have a similar merit as HTML tags.
Given all that together, it would be imho best if you can open an issue in the CommonMark spec repo.
... it's more XML rather than HTML thing, isn't it?
Yes. There's no such thing as a "tag with a namespace" in HTML. The "tag name" tokenizer state consumes everything except [\0\t\n\f />] as part of the basic tag name.
@craigbarnes does that mean a tag name state can parse <foo:bar/> with a tag name of foo:bar?
Yes, but foo is not a "namespace" (in the XML sense) when parsed as HTML. Namespace prefixes have specific semantics in XML/XHTML, whereas in HTML it just becomes part of the element name.
All elements in a HTML DOM tree have a namespace, but it's determined by what nodes are higher up in the tree (e.g. <svg>) rather than explicitly in the markup.
Activity
mity commentedon May 19, 2020
Indeed, it cannot.
It's exactly as CommonMark specification requests, I believe. As such, all compliant implementations won't recognize it.
Generally, the raw HTML support in Markdown/Commonmark is simplified.
Also, I'm not expert in this, but it's more XML rather than HTML thing, isn't it? But I admit, allowing XML tags might have a similar merit as HTML tags.
Given all that together, it would be imho best if you can open an issue in the CommonMark spec repo.
ioquatix commentedon May 19, 2020
Yes, I've made a proposal here: commonmark/commonmark-spec#648
Regarding 3, we already support namespaced attributes, so one might consider it an oversight that namespaced tags are not also supported.
craigbarnes commentedon Jun 26, 2020
Yes. There's no such thing as a "tag with a namespace" in HTML. The "tag name" tokenizer state consumes everything except
[\0\t\n\f />]as part of the basic tag name.ioquatix commentedon Jun 26, 2020
@craigbarnes does that mean a tag name state can parse
<foo:bar/>with a tag name offoo:bar?craigbarnes commentedon Jun 26, 2020
Yes, but
foois not a "namespace" (in the XML sense) when parsed as HTML. Namespace prefixes have specific semantics in XML/XHTML, whereas in HTML it just becomes part of the element name.All elements in a HTML DOM tree have a namespace, but it's determined by what nodes are higher up in the tree (e.g.
<svg>) rather than explicitly in the markup.