aboutsummaryrefslogtreecommitdiff
path: root/spec.txt
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-07-02 22:19:48 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2016-07-02 22:19:48 -0700
commit7e255b7248fd98818dd0a9c550897e4bf916e1af (patch)
tree76461f21f36c9e794133f363d9b2b13b3a4be2ca /spec.txt
parent0d9ae6e67fde9da608738ee97f9f4e40e6d01ee8 (diff)
Revert "Revert "Revert "ATX headers: clarify where tabs can go."""
This reverts commit ee779cb7f8ea3c6274aef89f9916931b907e211e.
Diffstat (limited to 'spec.txt')
-rw-r--r--spec.txt64
1 files changed, 23 insertions, 41 deletions
diff --git a/spec.txt b/spec.txt
index 28401fb..eb81475 100644
--- a/spec.txt
+++ b/spec.txt
@@ -721,18 +721,17 @@ If you want a thematic break in a list item, use a different bullet:
## ATX headings
-An [ATX heading](@) consists of a string of characters, parsed
-as inline content, between an opening sequence of 1--6 unescaped
-`#` characters and an optional closing sequence of any number of
-unescaped `#` characters. The opening sequence of `#`
-characters must be followed by a [space], a tab, or by the end of
-the line. The optional closing sequence of `#`s must be preceded
-by a [space] or tab and may be followed by spaces or tabs only.
-The opening `#` character may be indented 0-3 spaces. The raw
-contents of the heading are stripped of leading and trailing
-spaces and tabs before being parsed as inline content. The
-heading level is equal to the number of `#` characters in the
-opening sequence.
+An [ATX heading](@)
+consists of a string of characters, parsed as inline content, between an
+opening sequence of 1--6 unescaped `#` characters and an optional
+closing sequence of any number of unescaped `#` characters.
+The opening sequence of `#` characters must be followed by a
+[space] or by the end of line. The optional closing sequence of `#`s must be
+preceded by a [space] and may be followed by spaces only. The opening
+`#` character may be indented 0-3 spaces. The raw contents of the
+heading are stripped of leading and trailing spaces before being parsed
+as inline content. The heading level is equal to the number of `#`
+characters in the opening sequence.
Simple headings:
@@ -762,7 +761,7 @@ More than six `#` characters is not a heading:
````````````````````````````````
-At least one space or tab is required between the `#` characters and the
+At least one space is required between the `#` characters and the
heading's contents, unless the heading is empty. Note that many
implementations currently do not require the space. However, the
space was required by the
@@ -780,21 +779,12 @@ headings:
````````````````````````````````
-A tab can be used instead of a space:
+A tab will not work:
```````````````````````````````` example
#→foo
.
-<h1>foo</h1>
-````````````````````````````````
-
-
-Any number of spaces and tabs can be used after the `#`s:
-
-```````````````````````````````` example
-# →→ foo
-.
-<h1>foo</h1>
+<p>#→foo</p>
````````````````````````````````
@@ -816,16 +806,16 @@ Contents are parsed as inlines:
````````````````````````````````
-Leading and trailing spaces and tabs are ignored in parsing inline content:
+Leading and trailing blanks are ignored in parsing inline content:
```````````````````````````````` example
-# →→ foo →→
+# foo
.
<h1>foo</h1>
````````````````````````````````
-One to three spaces indentation are allowed before the first `#`:
+One to three spaces indentation are allowed:
```````````````````````````````` example
### foo
@@ -879,18 +869,18 @@ It need not be the same length as the opening sequence:
````````````````````````````````
-Spaces and tabs are allowed after the closing sequence:
+Spaces are allowed after the closing sequence:
```````````````````````````````` example
-### foo ###→
+### foo ###
.
<h3>foo</h3>
````````````````````````````````
-A sequence of `#` characters with anything but spaces or tabs
-following it is not a closing sequence, but counts as part of
-the contents of the heading:
+A sequence of `#` characters with anything but [spaces] following it
+is not a closing sequence, but counts as part of the contents of the
+heading:
```````````````````````````````` example
### foo ### b
@@ -899,7 +889,7 @@ the contents of the heading:
````````````````````````````````
-The closing sequence must be preceded by at least one space or tab:
+The closing sequence must be preceded by a space:
```````````````````````````````` example
# foo#
@@ -907,12 +897,6 @@ The closing sequence must be preceded by at least one space or tab:
<h1>foo#</h1>
````````````````````````````````
-```````````````````````````````` example
-# foo→#
-.
-<h1>foo</h1>
-````````````````````````````````
-
Backslash-escaped `#` characters do not count as part
of the closing sequence:
@@ -959,12 +943,10 @@ ATX headings can be empty:
##
#
### ###
-####→####
.
<h2></h2>
<h1></h1>
<h3></h3>
-<h4></h4>
````````````````````````````````