Skip to content

Fix/escaped brackets task#1971

Open
nina504 wants to merge 2 commits into
silverbulletmd:mainfrom
nina504:fix/escaped-brackets-task
Open

Fix/escaped brackets task#1971
nina504 wants to merge 2 commits into
silverbulletmd:mainfrom
nina504:fix/escaped-brackets-task

Conversation

@nina504

@nina504 nina504 commented May 8, 2026

Copy link
Copy Markdown

This PR fixes a bug where list items starting with escaped square brackets (e.g., - [Sample Text]) were incorrectly parsed and rendered as Tasks () instead of normal list items with links.

Previously, the MultiStatusTaskParser used the regular expression /^[([^\]:]+)](?:[ \t]|$)/ to match task states. This regex eagerly ingested escaped bracket sequences like [Sample Text as custom task states.

By updating the regex to /^[([^]:[\]+)](?:[ \t]|$)/ (explicitly rejecting [ and ), we ensure that task states only match valid, plain identifiers like x, , or TODO, safely letting standard Markdown link parsing handle such escaped links properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant