diff --git a/doc-build/md032.md b/doc-build/md032.md index 0cf4b715..43d6e6db 100644 --- a/doc-build/md032.md +++ b/doc-build/md032.md @@ -3,28 +3,45 @@ followed by a blank line: ```markdown Some text -* Some -* List +* List item +* List item -1. Some -2. List -Some text +1. List item +2. List item +*** ``` -To fix this, ensure that all lists have a blank line both before and after -(except where the block is at the beginning or end of the document): +In the first case above, text immediately precedes the unordered list. In the +second case above, a thematic break immediately follows the ordered list. To fix +violations of this rule, ensure that all lists have a blank line both before and +after (except when the list is at the very beginning or end of the document): ```markdown Some text -* Some -* List +* List item +* List item -1. Some -2. List +1. List item +2. List item -Some text +*** ``` -Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will -not parse lists that don't have blank lines before and after them. +Note that the following case is **not** a violation of this rule: + +```markdown +1. List item + More item 1 +2. List item +More item 2 +``` + +Although it is not indented, the text "More item 2" is referred to as a +[lazy continuation line][lazy-continuation] and considered part of the second +list item. + +Rationale: In addition to aesthetic reasons, some parsers, including kramdown, +will not parse lists that don't have blank lines before and after them. + +[lazy-continuation]: https://spec.commonmark.org/0.30/#lazy-continuation-line diff --git a/doc/Rules.md b/doc/Rules.md index ac5f1f86..6b59b6b1 100644 --- a/doc/Rules.md +++ b/doc/Rules.md @@ -1347,31 +1347,48 @@ followed by a blank line: ```markdown Some text -* Some -* List +* List item +* List item -1. Some -2. List -Some text +1. List item +2. List item +*** ``` -To fix this, ensure that all lists have a blank line both before and after -(except where the block is at the beginning or end of the document): +In the first case above, text immediately precedes the unordered list. In the +second case above, a thematic break immediately follows the ordered list. To fix +violations of this rule, ensure that all lists have a blank line both before and +after (except when the list is at the very beginning or end of the document): ```markdown Some text -* Some -* List +* List item +* List item -1. Some -2. List +1. List item +2. List item -Some text +*** ``` -Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will -not parse lists that don't have blank lines before and after them. +Note that the following case is **not** a violation of this rule: + +```markdown +1. List item + More item 1 +2. List item +More item 2 +``` + +Although it is not indented, the text "More item 2" is referred to as a +[lazy continuation line][lazy-continuation] and considered part of the second +list item. + +Rationale: In addition to aesthetic reasons, some parsers, including kramdown, +will not parse lists that don't have blank lines before and after them. + +[lazy-continuation]: https://spec.commonmark.org/0.30/#lazy-continuation-line diff --git a/doc/md032.md b/doc/md032.md index feb8e705..41c8b411 100644 --- a/doc/md032.md +++ b/doc/md032.md @@ -11,28 +11,45 @@ followed by a blank line: ```markdown Some text -* Some -* List +* List item +* List item -1. Some -2. List -Some text +1. List item +2. List item +*** ``` -To fix this, ensure that all lists have a blank line both before and after -(except where the block is at the beginning or end of the document): +In the first case above, text immediately precedes the unordered list. In the +second case above, a thematic break immediately follows the ordered list. To fix +violations of this rule, ensure that all lists have a blank line both before and +after (except when the list is at the very beginning or end of the document): ```markdown Some text -* Some -* List +* List item +* List item -1. Some -2. List +1. List item +2. List item -Some text +*** ``` -Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will -not parse lists that don't have blank lines before and after them. +Note that the following case is **not** a violation of this rule: + +```markdown +1. List item + More item 1 +2. List item +More item 2 +``` + +Although it is not indented, the text "More item 2" is referred to as a +[lazy continuation line][lazy-continuation] and considered part of the second +list item. + +Rationale: In addition to aesthetic reasons, some parsers, including kramdown, +will not parse lists that don't have blank lines before and after them. + +[lazy-continuation]: https://spec.commonmark.org/0.30/#lazy-continuation-line