diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-07-02 22:32:11 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-07-02 22:32:11 -0700 |
commit | ddebcbae1edc53d92ba1148ebd896361d4ffeb8d (patch) | |
tree | 4d84d96827edb1176bb3c4f5cbc1d22a0df89bd9 | |
parent | 1dcf47b5972e3646b6a0f0b48a6e1860e3f12f55 (diff) |
Improved the section on tabs.
Added some test cases for ATX headers and thematic breaks.
Clarified that it's not just cases that affect indentation
that matter, but all cases where whitespace matters for block
structure.
-rw-r--r-- | spec.txt | 36 |
1 files changed, 31 insertions, 5 deletions
@@ -336,9 +336,14 @@ the Unicode classes `Pc`, `Pd`, `Pe`, `Pf`, `Pi`, `Po`, or `Ps`. ## Tabs Tabs in lines are not expanded to [spaces]. 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. +in contexts where whitespace helps to define block structure, +tabs behave as if they were replaced by spaces with a tab stop +of 4 characters. + +Thus, for exmaple, a tab can be used instead of four spaces +in an indented code block. (Note, however, that internal +tabs are passed through as literal tabs, not expanded to +spaces.) ```````````````````````````````` example →foo→baz→→bim @@ -347,7 +352,6 @@ by spaces with a tab stop of 4 characters. </code></pre> ```````````````````````````````` - ```````````````````````````````` example →foo→baz→→bim . @@ -355,7 +359,6 @@ by spaces with a tab stop of 4 characters. </code></pre> ```````````````````````````````` - ```````````````````````````````` example a→a ὐ→a @@ -365,6 +368,9 @@ by spaces with a tab stop of 4 characters. </code></pre> ```````````````````````````````` +In the following example, a continuation paragraph of a list +item is indented with a tab; this has exactly the same effect +as indentation with four spaces would: ```````````````````````````````` example - foo @@ -393,6 +399,15 @@ by spaces with a tab stop of 4 characters. </ul> ```````````````````````````````` +Normally the `>` that begins a block quote may be followed +optionally by a space, which is not considered part of the +content. In the following case `>` is followed by a tab, +which is treated as if it were expanded into spaces. +Since one of theses spaces is considered part of the +delimiter, `foo` is considered to be indented six spaces +inside the block quote context, so we get an indented +code block starting with two spaces. + ```````````````````````````````` example >→→foo . @@ -441,6 +456,17 @@ bar </ul> ```````````````````````````````` +```````````````````````````````` example +#→Foo +. +<h1>Foo</h1> +```````````````````````````````` + +```````````````````````````````` example +*→*→*→ +. +<hr /> +```````````````````````````````` ## Insecure characters |