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
[Bug] Muya inserts blank lines between adjacent bullet and task items #5257
Muya inserts a blank line between adjacent bullet and task items when serializing Markdown. This changes a tight list into a loose list even when no spacing change was requested.
Steps to Reproduce
Parse and serialize this Markdown with Muya (packages/muya):
- A bullet
-[ ] A task
Expected Behavior
The list should remain unchanged, with no blank line between its items.
Actual Behavior
Muya produces:
- A bullet
-[ ] A task
The same problem occurs with the task item first and with mixed lists nested inside an ordered item. Authored loose spacing should still be preserved.
Operating System
Linux (Other).
MarkText Version
Muya @muyajs/core 0.2.0 from develop, tested on 6 September 2026. This reproduction uses the engine directly, not a packaged desktop release.
OS Version
Debian 12 container.
Reproducibility
The automated serialization regressions reliably reproduce the problem on unchanged upstream code.
Re-tested the reported Muya parse → serialize behavior against commit e8c602c. The original reproduction now stays unchanged, with no blank line inserted:
- A bullet
-[ ] A task
Verification covered eight cases: the original example, task-first ordering, alternating plain/task runs, both orderings nested inside an ordered item, authored loose spacing in both orderings, and a loose parent containing a tight mixed child list. Each case passed three consecutive parse/serialize round trips, preserving both the expected Markdown and the parsed structure. Together with the existing list serialization suite, all 60 tests passed.
Closing as resolved for the serialization behavior reported here. This verification covers the source-level engine; it does not establish which published desktop release first includes the fix.
Activity
Jocs commentedon Sep 7, 2026
MarkText treat
as two list, one is bullet list and another is task list. so add one blank line between them when format.
DePasqualeOrg commentedon Sep 7, 2026
Please see the full analysis with relevant references here: #5254 (comment)
Jocs commentedon Sep 8, 2026
I think there are two possible approaches to solve this problem:
Parse above markdown as a single list during Markdown parsing instead of splitting them into two lists.
However, at the moment, both approaches seem to require a fairly significant amount of work, so neither is particularly attractive.
Jocs commentedon Oct 27, 2026
Re-tested the reported Muya parse → serialize behavior against commit e8c602c. The original reproduction now stays unchanged, with no blank line inserted:
Verification covered eight cases: the original example, task-first ordering, alternating plain/task runs, both orderings nested inside an ordered item, authored loose spacing in both orderings, and a loose parent containing a tight mixed child list. Each case passed three consecutive parse/serialize round trips, preserving both the expected Markdown and the parsed structure. Together with the existing list serialization suite, all 60 tests passed.
The repository also has regression coverage for adjacent plain/task list runs. Related list fixes include #5854 and #5872.
Closing as resolved for the serialization behavior reported here. This verification covers the source-level engine; it does not establish which published desktop release first includes the fix.