microsoft / microsoft/vscode

Agents window Markdown editor: Enter on an empty task item leaves the item behind

Open
#327,537 0 comments 0 reactions 1 assignee Claimed by @ulugbekna View on GitHub
bug markdown-editor
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Testing #326540

Does this issue occur when all extensions are disabled?: Yes

- VS Code Version: Insiders with the experimental Markdown editor
- OS Version: macOS
- Audited package revision: microsoft/vscode-packages@1d81418d61ad769f154579196a51a9364c105e2d

### Steps to Reproduce

1. Open a Markdown document containing an empty task item:

```markdown
- [ ]
```

2. Put the caret after the trailing space.
3. Press Enter.

### Expected

As with an empty list item, Enter removes the empty task marker and exits the list into a normal paragraph.

### Actual

The empty task remains and a new regular list item is inserted:

```markdown
- [ ]
-
```

Pressing Enter a second time removes the new regular marker but still leaves the original empty task item behind.

### Impact

Users get stuck in an unexpected list state and accumulate empty task entries that must be cleaned up manually. The behavior also differs from regular list exit semantics, even though task items are rendered as list items.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.