You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Loose list with different bullet or ordered list delimiter are exported as tight list and/or as mixed list.
Steps to reproduce
Following list(s) are exported as tight list.
- foo
- foo
1. bar
2. bar
<optional new line>
- foo
- foo
- foo
- foo
- [ ] bar
- [ ] bar
Expected:
If one list is a loose list and further lists follow without separation all previous and following lists should be loose until a not list type is parsed. If two or more bullet and task lists follow without separation by not a list type a new line is parsed as loose list indicator. Meaning both examples above are loose lists because a new line is between two lists and none of the lists are separated by a paragraph or other not list type. Whereas the following exampe is a loose + tight list:
The blank line should be retained after parsing and bullet/task lists should be tight by default if not separated while parsing.
If one list is a loose list and further lists follow without separation all previous and following lists should be loose until a not list type is parsed.
Sorry I didn't find this in commonmark Spec?
And I test the first example in commonmark dingus:
It's not specified but according to other examples and after a thorough reading of the list specification the only problem is that the blank lines are not exported.
Re-tested both examples from this issue against commit e8c602c using Muya's MarkdownToState → ExportMarkdown pipeline, with listIndentation: 1. This is a source-level engine check, not a packaged desktop UI test.
1. Bullet / ordered / bullet lists
Input, with a blank line at each list boundary (rather than the literal <optional new line> placeholder):
- foo
- foo
1. bar
2. bar
- foo
- foo
Actual serialized output:
- foo
- foo
1. bar
2. bar
- foo
- foo
The blank lines between the separate lists are still removed. Re-parsing the output produces the same Muya state as parsing the input: the three lists remain separate and tight. The loss here is the original source spacing, not a change from loose to tight lists.
2. Plain items followed by task items, with an authored blank line
Input:
- foo
- foo
-[ ] bar
-[ ] bar
Actual serialized output:
- foo
- foo
-[ ] bar
-[ ] bar
The authored blank line is retained, but serialization adds blank lines between the other items as well. Re-parsing preserves the original Muya state and loose-list semantics; the exact placement of source blank lines is normalized.
For comparison, the tight mixed input below now round-trips unchanged:
- foo
-[ ] bar
Across six checked cases (the two issue examples, different bullet markers, different ordered delimiters, a different-marker task item, and the tight mixed control), all re-parsed states matched their initial states, and a second serialization was stable. Five cases changed the source whitespace; the tight mixed control did not.
The remaining behavior demonstrated by the original examples is source-whitespace preservation. The unwanted blank-line insertion into tight same-marker plain/task lists reported in #5257 is no longer reproduced. This distinction is consistent with #5872 leaving exact preservation of the distinct-marker gaps in this issue as separate work.
Activity
Jocs commentedon Apr 27, 2019
Sorry I didn't find this in commonmark Spec?
And I test the first example in commonmark dingus:
https://spec.commonmark.org/dingus/?text=-%20foo%0A-%20foo%0A%0A1.%20bar%0A2.%20bar%0A%0A%0A-%20foo%0A-%20foo
fxha commentedon Apr 27, 2019
It's not specified but according to other examples and after a thorough reading of the list specification the only problem is that the blank lines are not exported.
[-]Loose list regression[/-][+]Keep blank line between mixed list types[/+]Jocs commentedon Oct 27, 2026
Re-tested both examples from this issue against commit e8c602c using Muya's
MarkdownToState→ExportMarkdownpipeline, withlistIndentation: 1. This is a source-level engine check, not a packaged desktop UI test.1. Bullet / ordered / bullet lists
Input, with a blank line at each list boundary (rather than the literal
<optional new line>placeholder):Actual serialized output:
The blank lines between the separate lists are still removed. Re-parsing the output produces the same Muya state as parsing the input: the three lists remain separate and tight. The loss here is the original source spacing, not a change from loose to tight lists.
2. Plain items followed by task items, with an authored blank line
Input:
Actual serialized output:
The authored blank line is retained, but serialization adds blank lines between the other items as well. Re-parsing preserves the original Muya state and loose-list semantics; the exact placement of source blank lines is normalized.
For comparison, the tight mixed input below now round-trips unchanged:
Across six checked cases (the two issue examples, different bullet markers, different ordered delimiters, a different-marker task item, and the tight mixed control), all re-parsed states matched their initial states, and a second serialization was stable. Five cases changed the source whitespace; the tight mixed control did not.
The remaining behavior demonstrated by the original examples is source-whitespace preservation. The unwanted blank-line insertion into tight same-marker plain/task lists reported in #5257 is no longer reproduced. This distinction is consistent with #5872 leaving exact preservation of the distinct-marker gaps in this issue as separate work.