cmark

My personal build of CMark ✏️

Commit
f0a685206e08f12919d3fefaac807e0ea840f2fe
Parent
26537124a4070f7869db67317b90e08916050c8f
Author
John MacFarlane <jgm@berkeley.edu>
Date

Updated spec for new tab behavior.

This change will need to be ported to CommonMark if we do this.

We no longer replace spaces with tabs.

Rather, we treat tabs as equivalent spaces for purposes of determining structure. Tab stop is still 4.

Tabs in the text remain in the text.

Diffstat

1 file changed, 38 insertions, 7 deletions

Status File Name N° Changes Insertions Deletions
Modified test/spec.txt 45 38 7
diff --git a/test/spec.txt b/test/spec.txt
@@ -249,15 +249,24 @@ A [punctuation character](@punctuation-character) is an [ASCII
 punctuation character] or anything in
 the unicode classes `Pc`, `Pd`, `Pe`, `Pf`, `Pi`, `Po`, or `Ps`.
 
-## Preprocessing
+## Tabs
 
-Tabs in lines are immediately expanded to [spaces][space], with a tab
-stop of 4 characters:
+Tabs in lines are not expanded to [spaces][space].  However,
+in contexts where indentation is significant for the
+document's structure, tabs behave as if they were replaced
+by spaces with a tab stop of 4 characters.
 
 .
 →foo→baz→→bim
 .
-<pre><code>foo baz     bim
+<pre><code>foo→baz→→bim
+</code></pre>
+.
+
+.
+  →foo→baz→→bim
+.
+<pre><code>foo→baz→→bim
 </code></pre>
 .
 
@@ -265,11 +274,33 @@ stop of 4 characters:
     a→a
     ὐ→a
 .
-<pre><code>a   a
-ὐ   a
+<pre><code>a→a
+ὐ→a
 </code></pre>
 .
 
+.
+  - foo
+
+→bar
+.
+<ul>
+<li>
+<p>foo</p>
+<p>bar</p>
+</li>
+</ul>
+.
+
+.
+>→foo→bar
+.
+<blockquote>
+<p>foo→bar</p>
+</blockquote>
+.
+
+
 ## Insecure characters
 
 For security reasons, the Unicode character `U+0000` must be replaced
@@ -4251,7 +4282,7 @@ backslashes:
 .
 \→\A\a\ \3\φ\«
 .
-<p>\   \A\a\ \3\φ\«</p>
+<p>\→\A\a\ \3\φ\«</p>
 .
 
 Escaped characters are treated as regular characters and do