From ed90fbe66a92623f01fb38933659bb8607a4366f Mon Sep 17 00:00:00 2001 From: Aidan Woods Date: Thu, 27 Apr 2017 23:43:09 +0100 Subject: [PATCH 1/6] Block quote marker choice uniformity Require that the same block quote marker be used to avoid ambiguity in parsing strategy (compatible with the algorithm described [here](https://github.com/jgm/CommonMark/issues/460#issuecomment-293715367)) --- spec.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spec.txt b/spec.txt index f9305554..1643d44d 100644 --- a/spec.txt +++ b/spec.txt @@ -3194,9 +3194,12 @@ with a following space, or (b) a single character `>` not followed by a space. The following rules define [block quotes]: 1. **Basic case.** If a string of lines *Ls* constitute a sequence - of blocks *Bs*, then the result of prepending a [block quote + of blocks *Bs*, then the result of prepending the same [block quote marker] to the beginning of each line in *Ls* - is a [block quote](#block-quotes) containing *Bs*. + is a [block quote](#block-quotes) containing *Bs*. If some lines in *Ls* + are blank lines, then trailing whitespace after a block quote marker + may be omitted without affecting the interpertation of which block quote + marker was prepended. 2. **Laziness.** If a string of lines *Ls* constitute a [block quote](#block-quotes) with contents *Bs*, then the result of deleting From eae3e43052b8cb16016cde2a07b81eabf97697f7 Mon Sep 17 00:00:00 2001 From: Aidan Woods Date: Thu, 27 Apr 2017 23:52:26 +0100 Subject: [PATCH 2/6] Update spec.txt very sorry typo --- spec.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.txt b/spec.txt index 1643d44d..99d208d0 100644 --- a/spec.txt +++ b/spec.txt @@ -3198,7 +3198,7 @@ The following rules define [block quotes]: marker] to the beginning of each line in *Ls* is a [block quote](#block-quotes) containing *Bs*. If some lines in *Ls* are blank lines, then trailing whitespace after a block quote marker - may be omitted without affecting the interpertation of which block quote + may be omitted without affecting the interpretation of which block quote marker was prepended. 2. **Laziness.** If a string of lines *Ls* constitute a [block From 88bf7ba55a08611fafad3d27c20ee4227ecbf535 Mon Sep 17 00:00:00 2001 From: Aidan Woods Date: Thu, 4 May 2017 18:46:40 +0100 Subject: [PATCH 3/6] add examples --- spec.txt | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/spec.txt b/spec.txt index 99d208d0..81956506 100644 --- a/spec.txt +++ b/spec.txt @@ -3246,6 +3246,74 @@ baz

```````````````````````````````` +Indentation is determined by the shortest marker (on a non-blank line): + +```````````````````````````````` example +>- - asdf +> - sdfg +. +
+
    +
  • +
      +
    • asdf
    • +
    • sdfg
    • +
    +
  • +
+
+```````````````````````````````` + + +The following is equivalent to the above (but now using the longer marker): + +```````````````````````````````` example +> - - asdf +> - sdfg +. +
+
    +
  • +
      +
    • asdf
    • +
    • sdfg
    • +
    +
  • +
+
+```````````````````````````````` + + +List within a block quote, with the first item indented by three spaces: + +```````````````````````````````` example +> 1. a +>2. b +. +
+
    +
  1. a
  2. +
  3. b
  4. +
+
+```````````````````````````````` + + +The shortest marker may not occur on the first line, meaning four spaces is too many: +```````````````````````````````` example +> 1. a +>2. b +. +
+
1. a
+
+
    +
  1. b
  2. +
+
+```````````````````````````````` + + The `>` characters can be indented 1-3 spaces: ```````````````````````````````` example From 490f6ddd6063015b83757b0135888cd4567afa1f Mon Sep 17 00:00:00 2001 From: Aidan Woods Date: Thu, 4 May 2017 18:49:40 +0100 Subject: [PATCH 4/6] improve examples --- spec.txt | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/spec.txt b/spec.txt index 81956506..5b29f8e5 100644 --- a/spec.txt +++ b/spec.txt @@ -3250,14 +3250,19 @@ Indentation is determined by the shortest marker (on a non-blank line): ```````````````````````````````` example >- - asdf +> > - sdfg .
    • -
    • asdf
    • -
    • sdfg
    • +
    • +

      asdf

      +
    • +
    • +

      sdfg

      +
@@ -3269,14 +3274,19 @@ The following is equivalent to the above (but now using the longer marker): ```````````````````````````````` example > - - asdf +> > - sdfg .
    • -
    • asdf
    • -
    • sdfg
    • +
    • +

      asdf

      +
    • +
    • +

      sdfg

      +
From 0a510fdd81507612897e25dc687bbad5948a8535 Mon Sep 17 00:00:00 2001 From: Aidan Woods Date: Wed, 2 Aug 2017 07:32:38 +0100 Subject: [PATCH 5/6] language clarification: possible case, not an instruction --- spec.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.txt b/spec.txt index 5b29f8e5..85c88465 100644 --- a/spec.txt +++ b/spec.txt @@ -3309,7 +3309,7 @@ List within a block quote, with the first item indented by three spaces: ```````````````````````````````` -The shortest marker may not occur on the first line, meaning four spaces is too many: +The shortest marker might not occur on the first line, meaning four spaces is too many: ```````````````````````````````` example > 1. a >2. b From b82fcea0e623ff82ee71e752c2dad67ab92d2b43 Mon Sep 17 00:00:00 2001 From: Aidan Woods Date: Mon, 28 Aug 2017 17:12:37 +0100 Subject: [PATCH 6/6] Reword, and use the defined "blank lines" term. --- spec.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec.txt b/spec.txt index 85c88465..1f6a81ed 100644 --- a/spec.txt +++ b/spec.txt @@ -3197,8 +3197,8 @@ The following rules define [block quotes]: of blocks *Bs*, then the result of prepending the same [block quote marker] to the beginning of each line in *Ls* is a [block quote](#block-quotes) containing *Bs*. If some lines in *Ls* - are blank lines, then trailing whitespace after a block quote marker - may be omitted without affecting the interpretation of which block quote + are [blank lines](@), then any block quote marker may be used on these + blank lines without affecting the interpretation of which block quote marker was prepended. 2. **Laziness.** If a string of lines *Ls* constitute a [block