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
Inconsistent behaviour of <Enter> in bullet lists, leading to inconsistent line spacing of items #2310
🪲 pri/majorBugs will affect your normal use of Mark Text, causing you unwilling or unable to continue using MT🐛 bugSomething isn't working🔭 area/editor🦏 list blocklist bug and issue
Bullet lists sometimes have single spacing and sometimes have double spacing.
You can check this by opening the text file with another text editor, such as vi: some items are separated by a singre newline caracter, some by newline, some spaces and then another newline.
Can you reproduce the issue?
Not reliably. It seems that the double line spacing / adding extra line starts after MarkText gets confused regarding what is a new item in a bullet list and what is a new line.
The <Enter> key doesn't reliably start a new item in bullet lists, and sometimes instead enters a new line and some spaces (6, in my case). This prompts MarkText to start displaying those list items with double line spacing.
Steps to reproduce
N/A
Expected behaviour:
Pressing the key always does the same thing when in a bullet list. Entering a newline when in a bullet list should be only possible when pressing <shift + Enter>.
Marktext maintains consistent spacing of bullet lists.
Trying to delete and recreate a > between bullet list items doesn't produce different results (sometimes single line spacing, sometimes double).
Actual behaviour:
key sometimes starts a new list item, sometimes starts a new line that doesn't start with a bullet.
Some bullet lists items are separated by an extra blank line and some spaces, rendering as double spacing in MarkText.
Some bullet lists items are not separated by an extra blank line, rendering as single spacing in MarkText.
The source produced by the application should express a consistent rule about the count of empty lines between list items.
Note that in Markdown, parsing is the same regardless of whether one or no empty line separates the items. I think that the difference between Enter versus Shift + Enter is not related to this particular issue because the application is correctly generating a new list item each time the user presses Enter. The problem is the inconsistency in the appearance of the document source.
Suggest renaming to Inconsistent line spacing of list items in output.
(If keyboard action is inconsistent, then it probably should be reported separately.)
Actually, i initially thought i was reporting the display bug, but as i investigated more realised i the really underlying issue is the keyboard input bug. This issue (#2310) is, at the end of the day, for that bug: Enter doesn't reliably enter a new line, sometimes it enters a newline and several (6?) spaces.
If you identify the problem as related to keyboard input, then please try to discover whether the same problem occurs for the same keystrokes regardless of context in the document. If so, then you might consider revising the current presentation of the issue, or you might consider closing the issue, to begin again with a clean issue topic.
Note that other keyboard issues have been reported (see #2235), and any information that helps diagnose whether this issue is related to them is useful. Which country keyboard layout do you use? Does the issue reproduce in version 0.15.1?
It is also helpful if you can report an instance of the problem in which key strokes that should produce one presentation actually result in a different presentation.
This seems fixed today by a feature-flag:
Menu > File > Preferences > Markdown > Untoggle "List: Prefer loose list items"
Disabling it; I get the "normal" list behavior back, not adding extra new-lines.
This seems fixed today by a feature-flag: 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 reporting this. The inconsistent Enter-key behavior you described (sometimes creating a new bullet item, sometimes inserting a newline + spaces, and the resulting mixed blank-line spacing in the output) was a bug in the old editor engine (muyajs 0.16).
MarkText has since migrated to a new editor engine (@muyajs/core). In the new engine the "loose vs tight" property is stored once on the list itself (meta.loose) and applied uniformly to every item during serialization — there is no per-keystroke variation. The preferLooseListItem preference (Menu → File → Preferences → Markdown → "List: Prefer loose list items") now controls this consistently for all items in a list.
Two community members confirmed this in the comments (2023-12-30 and 2025-03-09): toggling that preference restores the expected behavior. Closing as resolved by the engine migration. Please open a new issue if you encounter a regression on a current release.
🪲 pri/majorBugs will affect your normal use of Mark Text, causing you unwilling or unable to continue using MT🐛 bugSomething isn't working🔭 area/editor🦏 list blocklist bug and issue
Activity
brainchild0 commentedon Aug 21, 2020
The source produced by the application should express a consistent rule about the count of empty lines between list items.
Note that in Markdown, parsing is the same regardless of whether one or no empty line separates the items. I think that the difference between Enter versus Shift + Enter is not related to this particular issue because the application is correctly generating a new list item each time the user presses Enter. The problem is the inconsistency in the appearance of the document source.
brainchild0 commentedon Aug 28, 2020
Suggest renaming to Inconsistent line spacing of list items in output.
(If keyboard action is inconsistent, then it probably should be reported separately.)
brainchild0 commentedon Aug 28, 2020
Closely related to #2286.
axelsimon commentedon Sep 2, 2020
Actually, i initially thought i was reporting the display bug, but as i investigated more realised i the really underlying issue is the keyboard input bug. This issue (#2310) is, at the end of the day, for that bug: Enter doesn't reliably enter a new line, sometimes it enters a newline and several (6?) spaces.
brainchild0 commentedon Sep 3, 2020
Thank you for the new information.
If you identify the problem as related to keyboard input, then please try to discover whether the same problem occurs for the same keystrokes regardless of context in the document. If so, then you might consider revising the current presentation of the issue, or you might consider closing the issue, to begin again with a clean issue topic.
Note that other keyboard issues have been reported (see #2235), and any information that helps diagnose whether this issue is related to them is useful. Which country keyboard layout do you use? Does the issue reproduce in version 0.15.1?
It is also helpful if you can report an instance of the problem in which key strokes that should produce one presentation actually result in a different presentation.
ivy-rew commentedon Dec 30, 2023
This seems fixed today by a feature-flag:

Menu > File > Preferences > Markdown > Untoggle "List: Prefer loose list items"
Disabling it; I get the "normal" list behavior back, not adding extra new-lines.
clooptu commentedon Mar 9, 2025
Thank you very much , it works!
Jocs commentedon Jun 22, 2026
Thank you for reporting this. The inconsistent Enter-key behavior you described (sometimes creating a new bullet item, sometimes inserting a newline + spaces, and the resulting mixed blank-line spacing in the output) was a bug in the old editor engine (muyajs 0.16).
MarkText has since migrated to a new editor engine (@muyajs/core). In the new engine the "loose vs tight" property is stored once on the list itself (
meta.loose) and applied uniformly to every item during serialization — there is no per-keystroke variation. ThepreferLooseListItempreference (Menu → File → Preferences → Markdown → "List: Prefer loose list items") now controls this consistently for all items in a list.Two community members confirmed this in the comments (2023-12-30 and 2025-03-09): toggling that preference restores the expected behavior. Closing as resolved by the engine migration. Please open a new issue if you encounter a regression on a current release.