aboutsummaryrefslogtreecommitdiff
path: root/spec.txt
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-31 22:24:43 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-31 22:24:43 -0800
commitb5e205fba226b3d8d94418e050022c48a37997f8 (patch)
tree1006497dbbe9ab34c5295bcf0d5a6823699c1728 /spec.txt
parentb16965c3dbdcb60d72903b97ba85ff47cedeaf05 (diff)
Revised Rule 3 for list items.
Previously this just applied to empty list items. It has been rewritten to apply to any list item starting with a blank line, including items like: - ``` code ``` Closes #275.
Diffstat (limited to 'spec.txt')
-rw-r--r--spec.txt39
1 files changed, 37 insertions, 2 deletions
diff --git a/spec.txt b/spec.txt
index 21bef8c..07d2c26 100644
--- a/spec.txt
+++ b/spec.txt
@@ -2998,8 +2998,42 @@ the above case:
</ul>
.
-3. **Empty list item.** A [list marker] followed by a
-line containing only [whitespace] is a list item with no contents.
+3. **Item starting with a blank line.** If a sequence of lines *Ls*
+ starting with a single [blank line] constitute a (possibly empty)
+ sequence of blocks *Bs*, not separated from each other by more than
+ one blank line, and *M* is a list marker *M* 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, 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
+ marker. If the list item is ordered, then it is also assigned a
+ start number, based on the ordered list marker.
+
+Here are some list items that start with a blank line but are not empty:
+
+.
+-
+ foo
+-
+ ```
+ bar
+ ```
+-
+ baz
+.
+<ul>
+<li>foo</li>
+<li>
+<pre><code>bar
+</code></pre>
+</li>
+<li>
+<pre><code>baz
+</code></pre>
+</li>
+</ul>
+.
Here is an empty bullet list item:
@@ -3053,6 +3087,7 @@ A list may start or end with an empty list item:
</ul>
.
+
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
of *L* by 1-3 spaces (the same for each line) also constitutes a