Skip to content

Saving a Markdown file removes its final newline #3780

Closed

Description

@AlexAndBear

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

Saving a Markdown file removes its final newline. Cause: packages/web-pkg/src/editor/composables/strategies/markdown.ts:52-55 returns the serializer output unchanged.

Reproduction Steps

  1. Open a Markdown file ending with a newline, edit, save.

Expected Outcome

The final newline is kept.

Actual Outcome

The file is saved without it, so every save adds a diff.

Screenshot

Activity

  1. self-assigned this
    on Oct 13, 2026
  2. moved this from In Progress to Todo in OpenCloud Team Boardon Oct 13, 2026
  3. removed their assignment
    on Oct 13, 2026
  4. jnweiger commented on Oct 14, 2026

    @jnweiger
    Sponsor

    Seen in 8.1.0
    Reproducable with .md files, but it does not happen with .txt .text or .csv files, there the trailing newline is preserved as expected.

  5. AlexAndBear commented on Oct 14, 2026

    @AlexAndBear
    MemberAuthor

    Seen in 8.1.0
    Reproducable with .md files, but it does not happen with .txt .text or .csv files, there the trailing newline is preserved as expected.

    Yes, this issue is about markdown files.

  6. moved this from Qualification to Prio <= 3 in OpenCloud Team Boardon Oct 20, 2026
  7. self-assigned this
    on Nov 3, 2026
  8. moved this from Prio <= 3 to In Progress in OpenCloud Team Boardon Nov 3, 2026
  9. moved this from In Progress to Needs Review in OpenCloud Team Boardon Nov 11, 2026
  10. moved this from Needs Review to Done in OpenCloud Team Boardon Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions