cmark
My personal build of CMark ✏️
- Commit
- 45a2e3a387909a73857f00612225aebda1d1f5b1
- Parent
- 96f924c37c2bc0136c6bea06dd1df611870fd0ac
- Author
- John MacFarlane <fiddlosopher@gmail.com>
- Date
Rewrote beginning of Entities section.
Clarified that only entities that are not in code blocks or code
spans are decoded.
Diffstat
1 file changed, 6 insertions, 12 deletions
Status |
File Name |
N° Changes |
Insertions |
Deletions |
Modified |
spec.txt |
18 |
6 |
12 |
diff --git a/spec.txt b/spec.txt
@@ -4145,13 +4145,12 @@ foo
## Entities
With the goal of making this standard as HTML-agnostic as possible, all
-valid HTML entities in any context are recognized as such and
-converted into unicode characters before they are stored in the AST.
-
-This allows implementations that target HTML output to trivially escape
-the entities when generating HTML, and simplifies the job of
-implementations targetting other languages, as these will only need to
-handle the unicode chars and need not be HTML-entity aware.
+valid HTML entities (except in code blocks and code spans)
+are recognized as such and converted into unicode characters before
+they are stored in the AST. This means that renderers to formats other
+than HTML need not be HTML-entity aware. HTML renderers may either escape
+unicode characters as entities or leave them as they are. (However,
+`"`, `&`, `<`, and `>` must always be rendered as entities.)
[Named entities](@name-entities) consist of `&`
+ any of the valid HTML5 entity names + `;`. The
@@ -4159,11 +4158,6 @@ handle the unicode chars and need not be HTML-entity aware.
is used as an authoritative source of the valid entity names and their
corresponding codepoints.
-Conforming implementations that target HTML don't need to generate
-entities for all the valid named entities that exist, with the exception
-of `"` (`"`), `&` (`&`), `<` (`<`) and `>` (`>`), which
-always need to be written as entities for security reasons.
-
.
& © Æ Ď ¾ ℋ ⅆ ∲
.