aboutsummaryrefslogtreecommitdiff
path: root/spec.txt
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-12-28 20:53:08 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-12-28 20:53:08 -0800
commit3469e391ebdb392ab045b4108245aaee429aa7ae (patch)
treece76ad21724b22284d599e740c596f4ad919c15c /spec.txt
parentbac75b84314ae9c0b30d3054e314be4be2ee61dc (diff)
ATX headers: clarify that a space (or EOL) is needed.
Other whitespace won't do. Added a test case and modified an existing one to make this clearer. Closes #373.
Diffstat (limited to 'spec.txt')
-rw-r--r--spec.txt16
1 files changed, 12 insertions, 4 deletions
diff --git a/spec.txt b/spec.txt
index e633e15..793d7ff 100644
--- a/spec.txt
+++ b/spec.txt
@@ -578,8 +578,8 @@ An [ATX heading](@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 cannot be followed directly by a
-[non-whitespace character]. The optional closing sequence of `#`s must be
+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
@@ -623,10 +623,18 @@ headings:
.
#5 bolt
-#foobar
+#hashtag
.
<p>#5 bolt</p>
-<p>#foobar</p>
+<p>#hashtag</p>
+.
+
+A tab will not work:
+
+.
+#→foo
+.
+<p># foo</p>
.
This is not a heading, because the first `#` is escaped: