marktext / marktext/marktext

[Bug] Muya inserts blank lines between adjacent bullet and task items

Open
#5,257 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

:beetle: pri/low :lion: need discuss
Dominant language
TypeScript
Stars
61.6k
Forks
4.6k
Avg merge
23h 49m
Merged PRs (30d)
89

Description

Description

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.

Related PR: #5254.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in packages/muya and run the automated serialization regressions described in the issue using the adjacent bullet and task example. Trace the Markdown serialization path and compare it with the related PR #5254; done means tight mixed lists remain unchanged while authored loose spacing is preserved, including reversed order and nested cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, typescript
Domain
content, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.