Skip to content

Blank lines are auto inserted no matter what - request for settings that align rendering with Discord #3772

Open

Description

@AutonomousCat

Describe your feature request

I'm using MarkText for writing announcements and rules for my Discord server, and it's been really helpful. One issue though is the behavior around newlines. For things such as headers, code blocks, and lists, it'll auto insert a blank line in the source text after switching back and forth between views, no matter how many times you remove it. This (with the exception of headers) causes issues that require manually deleting these blank lines before using the text within Discord.

What problem does this feature solve?

Headers aren't effected by the blank newline in Discord rendering, but they still demonstrate a point.
kPa7oMiU18

Lists are initially created with a blank line inbetween each list item.
egFtjezlBf

The blank lines don't get re-inserted, however they do cause another issue.
image

If I were to leave all the blank lines and paste it directly as a Discord message, Discord would render the spaces like new paragraphs.

The same also applies to code blocks.
Jsk8PuloYG
image

Activity

  1. rsholmes commented on Jun 2, 2024

    @rsholmes

    Having MarkText insert blank lines between list items is, I claim, the wrong behavior for any use case, period. At the very least there should be the option to disable this. But I don't understand why it does this at all.

  2. evilC commented on Oct 30, 2024

    @evilC

    This is highly annoying. If I try to edit a Git hosted document I am collaborating on, it adds newlines all over the place and causes a massive diff.
    Please fix!

  3. madumlao commented on May 13, 2025

    @madumlao

    Excess blank lines in lists can be disabled by turning off (default) "Prefer loose list items" in Preferences -> Markdown

    Image

  4. SPetersonNICE commented on Jan 23, 2026

    @SPetersonNICE

    Just started using MarkText and love it, except that every time I open an existing document, some rather long, that other people collaborate on or are in source-control, it auto-adds newlines after every header-element and list-element, etc which is not something we want to auto-apply if that's not the original style of the document.

    Please make this an option that can be disabled.

    ps. As a background task, I believe this line-insertion has unwanted side-effects as well. I pasted in a particularly long and complex document from an LLM. For the next couple minutes as I tried to read, edit, and paste in additional sections in the middle, it kept jumping the cursor to the bottom of the document, not inserting where I wanted, and Ctrl-Z didn't work as expected. I believe it was parsing the document, trying to auto-insert the blank lines and possibly auto-saving. I had to start over in a different text-editor for that task.

  5. NXH06 commented on May 10, 2026

    @NXH06

    While turning off "Prefer loose list items" does remove newlines between list items, headers are still unaffected. So this is still a problem.

  6. added
    🐛 bug
    🪲 pri/major
    on May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🪲 pri/major🐛 bug🔭 area/editor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions