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
{{ message }}
Repository navigation
Do not insert blank lines between list items #2286
🪲 pri/lowSome low-priority bugs, such as styles, some bugs on non-primary features🐛 bugSomething isn't working🔭 area/muya🦏 list blocklist bug and issue
It's not a question, neither a bug nor a feature request, but rather undesired/questionable behaviour. Typora has exactly the same issue, please see full explanation here - typora/typora-issues#2278. In short, when code block or paragraph is added to a list, MarkText inserts blank line between each list item no matter that "Preferred loose list item" option is disabled.
I just describe my use case. I use markdown to keep and manage my tasks. I prefer to keep task lists dense (tight), because in that case it's much easer to read, but it's very often when task need an additional explanation.
- [ ] foo
- [ ] bar
- [ ] baz
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Aliquam consequat placerat odio,condimentum tristique magna
accumsan et. Maecenas id felis eu lectus sodales faucibus
nec ac ex.
- [ ] tick
- [ ] subtask1
- [ ] subtask2
- [ ] tock
This is perfectly valid syntax, but when MarkText engine detects that list is loose it inserts additional blank lines between list items, thus making my task list two times bigger.
Reacted by Trev, Zheng PiaoDan, Gonzalo Peci, Zhaozhou Li, h67ma, zhaochen zhang and Lawrence Lagerlof
I agree with this, only, if it could be a setting, that would be even better. While I prefer no extra white space in lists, some people might prefer them.
The seeting seems available today:
Menu > File > Preferences > Markdown > Untoggle "List: Prefer loose list items"
Disabling it; I get the "normal" list behavior back, not adding extra new-lines.
Thank you for the detailed report and the Typora comparison!
The behavior you describe — blank lines inserted between all items of a list once any item contains a multi-paragraph block — is correct per the CommonMark specification, which treats looseness as a whole-list property: if any item is followed by a blank line the entire list is considered loose and every item is rendered/serialized with blank-line separation.
Since this report was filed, MarkText has added a preference that addresses the common case: Menu → File → Preferences → Markdown → "List: Prefer loose list items". Disabling this option causes newly created lists to default to tight (no blank lines). A contributor confirmed this in the comments in December 2023.
For existing files that are already parsed as loose (because they contain multi-paragraph items), the loose flag is read directly from the source markdown by the parser, so tight items in the same list will still round-trip with blank-line separation — this is a fundamental constraint of the CommonMark spec, not a MarkText bug.
Given that the preference setting covers the main use-case and the remaining behavior is spec-mandated, we're closing this issue. If you'd like per-item looseness control as a first-class feature (which would require deviating from the spec), please open a new feature request so it can be tracked separately.
🪲 pri/lowSome low-priority bugs, such as styles, some bugs on non-primary features🐛 bugSomething isn't working🔭 area/muya🦏 list blocklist bug and issue
Activity
trev-dev commentedon Jul 19, 2020
I agree with this, only, if it could be a setting, that would be even better. While I prefer no extra white space in lists, some people might prefer them.
ivy-rew commentedon Dec 30, 2023
The seeting seems available today:

Menu > File > Preferences > Markdown > Untoggle "List: Prefer loose list items"
Disabling it; I get the "normal" list behavior back, not adding extra new-lines.
Jocs commentedon Jun 22, 2026
Thank you for the detailed report and the Typora comparison!
The behavior you describe — blank lines inserted between all items of a list once any item contains a multi-paragraph block — is correct per the CommonMark specification, which treats looseness as a whole-list property: if any item is followed by a blank line the entire list is considered loose and every item is rendered/serialized with blank-line separation.
Since this report was filed, MarkText has added a preference that addresses the common case: Menu → File → Preferences → Markdown → "List: Prefer loose list items". Disabling this option causes newly created lists to default to tight (no blank lines). A contributor confirmed this in the comments in December 2023.
For existing files that are already parsed as loose (because they contain multi-paragraph items), the
looseflag is read directly from the source markdown by the parser, so tight items in the same list will still round-trip with blank-line separation — this is a fundamental constraint of the CommonMark spec, not a MarkText bug.Given that the preference setting covers the main use-case and the remaining behavior is spec-mandated, we're closing this issue. If you'd like per-item looseness control as a first-class feature (which would require deviating from the spec), please open a new feature request so it can be tracked separately.