cmark

My personal build of CMark ✏️

Commit
57a756462f30d7f2f03c8d8de9ea874cf9536fa9
Parent
6947731fffec1a0ad51d5053d8c6ca17e8c1a5cd
Author
John MacFarlane <jgm@berkeley.edu>
Date

Updated spec.txt from CommonMark repo.

Diffstat

1 file changed, 86 insertions, 0 deletions

Status File Name N° Changes Insertions Deletions
Modified test/spec.txt 86 86 0
diff --git a/test/spec.txt b/test/spec.txt
@@ -1854,6 +1854,24 @@ them.
 <p><a href="my%20url" title="title">Foo bar</a></p>
 .
 
+The title may extend over multiple lines:
+
+.
+[foo]: /url '
+title
+line1
+line2
+'
+
+[foo]
+.
+<p><a href="/url" title="
+title
+line1
+line2
+">foo</a></p>
+.
+
 The title may be omitted:
 
 .
@@ -1925,6 +1943,17 @@ It contributes nothing to the document.
 .
 .
 
+Here is another one:
+
+.
+[
+foo
+]: /url
+bar
+.
+<p>bar</p>
+.
+
 This is not a link reference definition, because there are
 [non-space character]s after the title:
 
@@ -2705,6 +2734,18 @@ far enough past the blockquote marker:
 </blockquote>
 .
 
+Note that at least one space is needed between the list marker and
+any following content, so these are not list items:
+
+.
+-one
+
+2.two
+.
+<p>-one</p>
+<p>2.two</p>
+.
+
 A list item may not contain blocks that are separated by more than
 one blank line.  Thus, two blank lines will end a list, unless the
 two blanks are contained in a [fenced code block].
@@ -4759,6 +4800,18 @@ whitespace:
 <p>*foo bar *</p>
 .
 
+A newline also counts as whitespace:
+
+.
+*foo bar
+*
+.
+<p>*foo bar</p>
+<ul>
+<li></li>
+</ul>
+.
+
 This is not emphasis, because the second `*` is
 preceded by punctuation and followed by an alphanumeric
 (hence it is not part of a [right-flanking delimiter run]:
@@ -4887,6 +4940,15 @@ __ foo bar__
 <p>__ foo bar__</p>
 .
 
+A newline counts as whitespace:
+.
+__
+foo bar__
+.
+<p>__
+foo bar__</p>
+.
+
 This is not strong emphasis, because the opening `__` is preceded
 by an alphanumeric and followed by punctuation:
 
@@ -6253,6 +6315,14 @@ Thus, `[foo]` is equivalent to `[foo][]`.
 <p>[<a href="/url" title="title"><em>foo</em> bar</a>]</p>
 .
 
+.
+[[bar [foo]
+
+[foo]: /url
+.
+<p>[[bar <a href="/url">foo</a></p>
+.
+
 The link labels are case-insensitive:
 
 .
@@ -6625,6 +6695,14 @@ Spaces are not allowed in autolinks:
 <p>&lt;http://foo.bar/baz bim&gt;</p>
 .
 
+Backslash-escapes do not work inside autolinks:
+
+.
+<http://example.com/\[\>
+.
+<p><a href="http://example.com/%5C%5B%5C">http://example.com/\[\</a></p>
+.
+
 An [email autolink](@email-autolink)
 consists of `<`, followed by an [email address],
 followed by `>`.  The link's label is the email address,
@@ -6652,6 +6730,14 @@ Examples of email autolinks:
 <p><a href="mailto:foo+special@Bar.baz-bar0.com">foo+special@Bar.baz-bar0.com</a></p>
 .
 
+Backslash-escapes do not work inside email autolinks:
+
+.
+<foo\+@bar.example.com>
+.
+<p>&lt;foo+@bar.example.com&gt;</p>
+.
+
 These are not autolinks:
 
 .