diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-04-06 10:18:56 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-04-06 10:18:56 -0700 |
commit | 6f1f4e312016261143b3ebf91e35a1ddb805cdf1 (patch) | |
tree | 4795d42738f89581fb50c3700dfc1711e3a60c4e /test/spec.txt | |
parent | 4bb756a98c0982b8b39b4eee8091e1a5f60d7111 (diff) |
Update spec.
Diffstat (limited to 'test/spec.txt')
-rw-r--r-- | test/spec.txt | 90 |
1 files changed, 83 insertions, 7 deletions
diff --git a/test/spec.txt b/test/spec.txt index 6384390..4ca3aa0 100644 --- a/test/spec.txt +++ b/test/spec.txt @@ -5601,13 +5601,23 @@ foo ## Entity and numeric character references -All valid HTML entity references and numeric character -references, except those occurring in code blocks and code spans, -are recognized as such and treated as equivalent to the -corresponding Unicode characters. Conforming CommonMark parsers -need not store information about whether a particular character -was represented in the source using a Unicode character or -an entity reference. +Valid HTML entity references and numeric character references +can be used in place of the corresponding Unicode character, +with the following exceptions: + +- Entity and character references are not recognized in code + blocks and code spans. + +- Entity and character references cannot stand in place of + special characters that define structural elements in + CommonMark. For example, although `*` can be used + in place of a literal `*` character, `*` cannot replace + `*` in emphasis delimiters, bullet list markers, or thematic + breaks. + +Conforming CommonMark parsers need not store information about +whether a particular character was represented in the source +using a Unicode character or an entity reference. [Entity references](@) consist of `&` + any of the valid HTML5 entity names + `;`. The @@ -5745,6 +5755,51 @@ text in code spans and code blocks: ```````````````````````````````` +Entity and numeric character references cannot be used +in place of symbols indicating structure in CommonMark +documents. + +```````````````````````````````` example +*foo* +*foo* +. +<p>*foo* +<em>foo</em></p> +```````````````````````````````` + +```````````````````````````````` example +* foo + +* foo +. +<p>* foo</p> +<ul> +<li>foo</li> +</ul> +```````````````````````````````` + +```````````````````````````````` example +foo bar +. +<p>foo + +bar</p> +```````````````````````````````` + +```````````````````````````````` example +	foo +. +<p>→foo</p> +```````````````````````````````` + + +```````````````````````````````` example +[a](url "tit") +. +<p>[a](url "tit")</p> +```````````````````````````````` + + ## Code spans A [backtick string](@) @@ -7464,6 +7519,15 @@ bar>) bar>)</p> ```````````````````````````````` +The destination can contain `)` if it is enclosed +in pointy brackets: + +```````````````````````````````` example +[a](<b)c>) +. +<p><a href="b)c">a</a></p> +```````````````````````````````` + Pointy brackets that enclose links must be unescaped: ```````````````````````````````` example @@ -7472,6 +7536,18 @@ Pointy brackets that enclose links must be unescaped: <p>[link](<foo>)</p> ```````````````````````````````` +These are not links, because the opening pointy bracket +is not matched properly: + +```````````````````````````````` example +[a](<b)c +[a](<b)c> +[a](<b>c) +. +<p>[a](<b)c +[a](<b)c> +[a](<b>c)</p> +```````````````````````````````` Parentheses inside the link destination may be escaped: |