diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-01-31 22:24:43 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-01-31 22:24:43 -0800 |
commit | b5e205fba226b3d8d94418e050022c48a37997f8 (patch) | |
tree | 1006497dbbe9ab34c5295bcf0d5a6823699c1728 | |
parent | b16965c3dbdcb60d72903b97ba85ff47cedeaf05 (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.
-rw-r--r-- | spec.txt | 39 |
1 files changed, 37 insertions, 2 deletions
@@ -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 |