Date: Tue, 19 May 2020 16:09:11 +0200
Subject: [PATCH 18/21] Remove duplicate indentations
---
spec.txt | 39 ++++++++++++++++++++-------------------
1 file changed, 20 insertions(+), 19 deletions(-)
diff --git a/spec.txt b/spec.txt
index 58a540d7..f37e4838 100644
--- a/spec.txt
+++ b/spec.txt
@@ -1093,7 +1093,7 @@ closing sequence of any number of unescaped `#` characters.
The opening sequence of `#` characters must be followed by spaces or tabs, or
by the end of line. The optional closing sequence of `#`s must be preceded by
spaces or tabs and may be followed by spaces or tabs only. The opening
-`#` character may be indented 0-3 spaces of indentation. The raw contents of
+`#` character may be preceded by 1-3 spaces of indentation. The raw contents of
the heading are stripped of leading and trailing space or tabs before being
parsed as inline content. The heading level is equal to the number of `#`
characters in the opening sequence.
@@ -1320,7 +1320,7 @@ interpretable as a [code fence], [ATX heading][ATX headings],
A [setext heading underline](@) is a sequence of
`=` characters or a sequence of `-` characters, with no more than 3
-spaces of indentation and any number of trailing space or tabs. If a line
+spaces of indentation and any number of trailing spaces or tabs. If a line
containing a single `-` can be interpreted as an
empty [list items], it should be interpreted this way
and not as a [setext heading underline].
@@ -1390,8 +1390,8 @@ Foo
````````````````````````````````
-The heading content can be indented up to three spaces of indentation, and need
-not line up with the underlining:
+The heading content can be preceded by up to three spaces of indentation, and
+need not line up with the underlining:
```````````````````````````````` example
Foo
@@ -1427,8 +1427,8 @@ Foo
````````````````````````````````
-The setext heading underline can be indented up to three spaces of indentation,
-and may have trailing spaces or tabs:
+The setext heading underline can be preceded by up to three spaces of
+indentation, and may have trailing spaces or tabs:
```````````````````````````````` example
Foo
@@ -1887,7 +1887,7 @@ Heading
````````````````````````````````
-The first line can be indented more than four spaces of indentation:
+The first line can be preceded by more than four spaces of indentation:
```````````````````````````````` example
foo
@@ -1931,7 +1931,7 @@ A [code fence](@) is a sequence
of at least three consecutive backtick characters (`` ` ``) or
tildes (`~`). (Tildes and backticks cannot be mixed.)
A [fenced code block](@)
-begins with a code fence, indented no more than three spaces of indentation.
+begins with a code fence, preceded by no more than three spaces of indentation.
The line with the opening code fence may optionally contain some text
following the code fence; this is trimmed of leading and trailing
@@ -1945,12 +1945,12 @@ The content of the code block consists of all subsequent lines, until
a closing [code fence] of the same type as the code block
began with (backticks or tildes), and with at least as many backticks
or tildes as the opening code fence. If the leading code fence is
-indented N spaces of indentation, then up to N spaces of indentation are removed
-from each line of the content (if present). (If a content line is not
+preceded by N spaces of indentation, then up to N spaces of indentation are
+removed from each line of the content (if present). (If a content line is not
indented, it is preserved unchanged. If it is indented N spaces or less, all
of the indentation is removed.)
-The closing code fence may be indented up to three spaces of indentation, and
+The closing code fence may be preceded by up to three spaces of indentation, and
may be followed only by spaces or tabs, which are ignored. If the end of the
containing block (or document) is reached and no closing code fence
has been found, the code block contains all of the lines after the
@@ -2178,7 +2178,7 @@ aaa
````````````````````````````````
-Closing fences may be indented by 0-3 spaces of indentation, and their
+Closing fences may be preceded by 1-3 spaces of indentation, and their
indentation need not match that of the opening fence:
```````````````````````````````` example
@@ -2938,7 +2938,7 @@ function matchwo(a,b)
````````````````````````````````
-The opening tag can be indented 1-3 spaces of indentation, but not 4:
+The opening tag can be preceded by 1-3 spaces of indentation, but not 4:
```````````````````````````````` example
@@ -3132,7 +3132,8 @@ deleted. The exception is inside `` tags, but as described
## Link reference definitions
A [link reference definition](@)
-consists of a [link label], indented up to three spaces of indentation, followed
+consists of a [link label], optionally preceded by up to three spaces of
+indentation, followed
by a colon (`:`), optional spaces or tabs (including up to one
[line ending]), a [link destination],
optional spaces or tabs (including up to one
@@ -3567,7 +3568,7 @@ ccc
````````````````````````````````
-However, the first line may be indented at most three spaces of indentation,
+However, the first line may be preceded by at most three spaces of indentation,
or an indented code block will be triggered:
```````````````````````````````` example
@@ -3705,7 +3706,7 @@ baz
````````````````````````````````
-The `>` characters can be indented 1-3 spaces of indentation:
+The `>` characters can be preceded by 1-3 spaces of indentation:
```````````````````````````````` example
> # Foo
@@ -4411,7 +4412,7 @@ A start number may not be negative:
marker. If the list item is ordered, then it is also assigned a
start number, based on the ordered list marker.
-An indented code block will have to be indented four spaces of indentation
+An indented code block will have to be preceded by four spaces of indentation
beyond the edge of the region where text will be included in the list item.
In the following case that is 6 spaces:
@@ -4512,7 +4513,7 @@ in which the lines to be included in a list item begin with a
characer other than a space or tab, and (b) cases in which
they begin with an indented code
block. In a case like the following, where the first block begins with
-a three spaces of indentation, the rules do not allow us to form a list item by
+three spaces of indentation, the rules do not allow us to form a list item by
indenting the whole thing and prepending a list marker:
```````````````````````````````` example
@@ -5505,7 +5506,7 @@ item:
````````````````````````````````
-Note, however, that list items may not be indented more than
+Note, however, that list items may not be preceded by more than
three spaces of indentation. Here `- e` is treated as a paragraph continuation
line, because it is indented more than three spaces:
From 2201adbdaecb229370d05b2562a5bdcb6635bf82 Mon Sep 17 00:00:00 2001
From: Titus Wormer
Date: Tue, 19 May 2020 16:16:31 +0200
Subject: [PATCH 19/21] Fix two more duplicate indentations
---
spec.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/spec.txt b/spec.txt
index f37e4838..bf1c3d9c 100644
--- a/spec.txt
+++ b/spec.txt
@@ -1730,8 +1730,8 @@ baz
An [indented code block](@) is composed of one or more
[indented chunks] separated by blank lines.
An [indented chunk](@) is a sequence of non-blank lines,
-each indented four or more spaces of indentation. The contents of the code block
-are the literal contents of the lines, including trailing
+each preceded by four or more spaces of indentation. The contents of the code
+block are the literal contents of the lines, including trailing
[line endings], minus four spaces of indentation.
An indented code block has no [info string].
@@ -4449,8 +4449,8 @@ And in this case it is 11 spaces:
If the *first* block in the list item is an indented code block,
-then by rule #2, the contents must be indented *one* space of indentation after
-the list marker:
+then by rule #2, the contents must be preceded by *one* space of indentation
+after the list marker:
```````````````````````````````` example
indented code
From ac533b83337b1cdecfe4aed7b32998339b35558b Mon Sep 17 00:00:00 2001
From: Titus Wormer
Date: Tue, 19 May 2020 16:29:21 +0200
Subject: [PATCH 20/21] Fix two more duplicate indentations
---
spec.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/spec.txt b/spec.txt
index bf1c3d9c..81578322 100644
--- a/spec.txt
+++ b/spec.txt
@@ -4561,7 +4561,7 @@ the above case:
starting with a single [blank line] constitute a (possibly empty)
sequence of blocks *Bs*, and *M* is a list marker of width *W*,
then the result of prepending *M* to the first line of *Ls*, and
- indenting subsequent lines of *Ls* by *W + 1* spaces of indentation, is a
+ preceding subsequent lines of *Ls* by *W + 1* spaces of indentation, is a
list item with *Bs* as its contents.
If a line is empty, then it need not be indented. The type of the
list item (bullet or ordered) is determined by the type of its list
@@ -4694,7 +4694,7 @@ foo
4. **Indentation.** If a sequence of lines *Ls* constitutes a list item
- according to rule #1, #2, or #3, then the result of indenting each line
+ according to rule #1, #2, or #3, then the result of preceding each line
of *Ls* by 1-3 spaces of indentation (the same for each line) also
constitutes a list item with the same contents and attributes. If a line is
empty, then it need not be indented.
From 69abb8164061d12ea3f22f094b1ed8ee4f882c3d Mon Sep 17 00:00:00 2001
From: Titus Wormer
Date: Sat, 23 May 2020 09:34:45 +0200
Subject: [PATCH 21/21] Do away with ranges and use words instead
---
spec.txt | 58 +++++++++++++++++++++++++++++---------------------------
1 file changed, 30 insertions(+), 28 deletions(-)
diff --git a/spec.txt b/spec.txt
index 81578322..7dcfc48e 100644
--- a/spec.txt
+++ b/spec.txt
@@ -862,8 +862,8 @@ Markdown document.
## Thematic breaks
-A line consisting of 0-3 spaces of indentation, followed by a sequence
-of three or more matching `-`, `_`, or `*` characters, each followed
+A line consisting of optionally up to three spaces of indentation, followed by a
+sequence of three or more matching `-`, `_`, or `*` characters, each followed
optionally by any number of spaces or tabs, forms a
[thematic break](@).
@@ -907,7 +907,7 @@ __
````````````````````````````````
-One to three spaces of indentation are allowed:
+Up to three spaces of indentation are allowed:
```````````````````````````````` example
***
@@ -1093,10 +1093,10 @@ closing sequence of any number of unescaped `#` characters.
The opening sequence of `#` characters must be followed by spaces or tabs, or
by the end of line. The optional closing sequence of `#`s must be preceded by
spaces or tabs and may be followed by spaces or tabs only. The opening
-`#` character may be preceded by 1-3 spaces of indentation. The raw contents of
-the heading are stripped of leading and trailing space or tabs before being
-parsed as inline content. The heading level is equal to the number of `#`
-characters in the opening sequence.
+`#` character may be preceded by up to three spaces of indentation. The raw
+contents of the heading are stripped of leading and trailing space or tabs
+before being parsed as inline content. The heading level is equal to the number
+of `#` characters in the opening sequence.
Simple headings:
@@ -1171,7 +1171,7 @@ Leading and trailing spaces or tabs are ignored in parsing inline content:
````````````````````````````````
-One to three spaces of indentation are allowed:
+Up to three spaces of indentation are allowed:
```````````````````````````````` example
### foo
@@ -1184,7 +1184,7 @@ One to three spaces of indentation are allowed:
````````````````````````````````
-Four spaces of indentation are too much:
+Four spaces of indentation is too many:
```````````````````````````````` example
# foo
@@ -1409,7 +1409,7 @@ need not line up with the underlining:
````````````````````````````````
-Four spaces of indentation is too much:
+Four spaces of indentation is too many:
```````````````````````````````` example
Foo
@@ -1438,7 +1438,7 @@ Foo
````````````````````````````````
-Four spaces of indentation is too much:
+Four spaces of indentation is too many:
```````````````````````````````` example
Foo
@@ -1931,7 +1931,7 @@ A [code fence](@) is a sequence
of at least three consecutive backtick characters (`` ` ``) or
tildes (`~`). (Tildes and backticks cannot be mixed.)
A [fenced code block](@)
-begins with a code fence, preceded by no more than three spaces of indentation.
+begins with a code fence, preceded by up to three spaces of indentation.
The line with the opening code fence may optionally contain some text
following the code fence; this is trimmed of leading and trailing
@@ -2164,7 +2164,7 @@ aaa
````````````````````````````````
-Four spaces of indentation produces an indented code block:
+Four spaces of indentation is too many:
```````````````````````````````` example
```
@@ -2178,7 +2178,7 @@ aaa
````````````````````````````````
-Closing fences may be preceded by 1-3 spaces of indentation, and their
+Closing fences may be preceded by up to three spaces of indentation, and their
indentation need not match that of the opening fence:
```````````````````````````````` example
@@ -2938,7 +2938,8 @@ function matchwo(a,b)
````````````````````````````````
-The opening tag can be preceded by 1-3 spaces of indentation, but not 4:
+The opening tag can be preceded by up to three spaces of indentation, but not
+four:
```````````````````````````````` example
@@ -3568,8 +3569,8 @@ ccc
````````````````````````````````
-However, the first line may be preceded by at most three spaces of indentation,
-or an indented code block will be triggered:
+However, the first line may be preceded by up to three spaces of indentation.
+Four spaces of indentation is too many:
```````````````````````````````` example
aaa
@@ -3649,10 +3650,11 @@ these constructions. (A recipe is provided below in the section entitled
## Block quotes
-A [block quote marker](@)
-consists of 0-3 spaces of indentation, plus (a) the character `>` together
-with a following space of indentation, or (b) a single character `>` not
-followed by a space of indentation.
+A [block quote marker](@),
+optionally preceded by up to three spaces of indentation,
+consists of (a) the character `>` together with a following space of
+indentation, or (b) a single character `>` not followed by a space of
+indentation.
The following rules define [block quotes]:
@@ -3706,7 +3708,7 @@ baz
````````````````````````````````
-The `>` characters can be preceded by 1-3 spaces of indentation:
+The `>` characters can be preceded by up to three spaces of indentation:
```````````````````````````````` example
> # Foo
@@ -3721,7 +3723,7 @@ baz
````````````````````````````````
-Four spaces of indentation gives us a code block:
+Four spaces of indentation is too many:
```````````````````````````````` example
> # Foo
@@ -4538,8 +4540,8 @@ bar
````````````````````````````````
-This is not a significant restriction, because when a block begins
-with 1-3 spaces of indentation, the indentation can always be removed without
+This is not a significant restriction, because when a block is preceded by up to
+three spaces of indentation, the indentation can always be removed without
a change in interpretation, allowing rule #1 to be applied. So, in
the above case:
@@ -4695,7 +4697,7 @@ foo
4. **Indentation.** If a sequence of lines *Ls* constitutes a list item
according to rule #1, #2, or #3, then the result of preceding each line
- of *Ls* by 1-3 spaces of indentation (the same for each line) also
+ of *Ls* by up to three spaces of indentation (the same for each line) also
constitutes a list item with the same contents and attributes. If a line is
empty, then it need not be indented.
@@ -5113,8 +5115,8 @@ The choice of four spaces is arbitrary. It can be learned, but it is
not likely to be guessed, and it trips up beginners regularly.
Would it help to adopt a two-space rule? The problem is that such
-a rule, together with the rule allowing 1--3 spaces indentation of the
-initial list marker, allows text that is indented *less than* the
+a rule, together with the rule allowing up to three spaces of indentation for
+the initial list marker, allows text that is indented *less than* the
original list marker to be included in the list item. For example,
`Markdown.pl` parses