Base on spec, Entities are recognized in any context besides code spans or code blocks, including raw HTML, URLs. But example 241 does not convert entities? Test in commonmark.js, it does not convert either.
It’s hard to know how to explain this best. I said “including raw HTML” because we don’t want to give the impression that
ö in a raw HTML context will be treated as a literal ampersand followed by
ouml;. But of course there is a difference between how entities are handled in raw HTML and how they’re handled in other Markdown. In raw HTML they are simply passed through unchanged (which is certainly what we want, I think). In other Markdown (besides code) they are resolved to a unicode character and dealt with appropriately for their context. In code they are not recognized as entities;
& is just an ampersand followed by the letters
+++ textnut [Jan 16 15 22:50 ]:
It is hard to understand the different between 241 and 242. 242 does entity conversion and URL encoding
öö – Entity -->
öö – URL encode --> %26ouml%3B%26ouml%3B
Example 241 does nothing.
I assume the 241 is for the explanation on HTML and 242 for URL. At least including raw HTML, URLs is not consistent on these 2 example?
I agree that some rewording would be helpful here, to distinguish three
- entities in raw HTML contexts - passed through unchanged
- entities in code blocks/spans - treated as literal text
- entities anywhere else - interpreted as equivalent to a unicode
+++ textnut [Jan 17 15 03:48 ]: