Skip to content

Text editor moves an indented paragraph after a task list into the last task item #3756

Open

Description

@JammingBen

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

The text editor moves a paragraph indented by one space after a task list into the last task item. No text is lost. Bullet lists are not affected. Follow-up to #3583, related to #3624.

Reproduction Steps

Open a markdown file with this content in the text editor, save, reload.

- [ ] a
- [ ] b

 x paragraph

Expected Outcome

x paragraph stays a separate paragraph after the list, as in CommonMark, and is saved as x paragraph.

Actual Outcome

x paragraph is loaded as a second paragraph of task b and saved as - [ ] a\n- [ ] b\n\n x paragraph.

The workaround in markdownTaskList.ts moves lines indented less than a task item's content into that item, even when they don't reach its content column.

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

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions