cmark

My personal build of CMark ✏️

Commit
9abc1336da9730fb6ddb766aca193f1923d3a02f
Parent
1b6afb7654d29eced20de720d7b5d37fb861bad3
Author
John MacFarlane <jgm@berkeley.edu>
Date

Clarified precedence of code spans, HTML tags, autolinks.

Closes #259.

Diffstat

1 file changed, 21 insertions, 4 deletions

Status File Name N° Changes Insertions Deletions
Modified spec.txt 25 21 4
diff --git a/spec.txt b/spec.txt
@@ -4376,15 +4376,16 @@ And this is not parsed as a link:
 <p>[not a <code>link](/foo</code>)</p>
 .
 
-But this is a link:
+Code spans, HTML tags, and autolinks have the same precedence.
+Thus, this is code:
 
 .
-<http://foo.bar.`baz>`
+`<a href="`">`
 .
-<p><a href="http://foo.bar.%60baz">http://foo.bar.`baz</a>`</p>
+<p><code>&lt;a href=&quot;</code>&quot;&gt;`</p>
 .
 
-And this is an HTML tag:
+But this is an HTML tag:
 
 .
 <a href="`">`
@@ -4392,6 +4393,22 @@ And this is an HTML tag:
 <p><a href="`">`</p>
 .
 
+And this is code:
+
+.
+`<http://foo.bar.`baz>`
+.
+<p><code>&lt;http://foo.bar.</code>baz&gt;`</p>
+.
+
+But this is an autolink:
+
+.
+<http://foo.bar.`baz>`
+.
+<p><a href="http://foo.bar.%60baz">http://foo.bar.`baz</a>`</p>
+.
+
 When a backtick string is not closed by a matching backtick string,
 we just have literal backticks: