Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@viniciussoares
Copy link
Contributor

Fixes checkbox toggle failing with "Checkbox not found in file" error when task list items contain inline markdown formatting like bold, code, or strikethrough.

Problem

When toggling a checkbox in interactive mode, the parser strips inline markdown formatting from the displayed text, but the toggle function compares this stripped text against the raw file line which still contains formatting markers. This causes the match to fail.

Example that fails before this fix:

- [ ] **Bold task** - description
- [ ] `Code task` - description
- [ ] ~~Strikethrough~~ - description

Solution

Added strip_inline_markdown() helper function that removes common inline formatting markers (**, __, `, ~~) from the raw file line text before comparing it to the parsed text.

Testing

Tested with markdown files containing:

  • **bold** text in checkboxes
  • __bold__ alternative syntax
  • `code` spans in checkboxes
  • ~~strikethrough~~ text
  • Multiple formatting in same line
  • Regular checkboxes (no regression)

@nicholasjpaterno nicholasjpaterno merged commit 899f4da into Epistates:main Dec 12, 2025
@nicholasjpaterno
Copy link
Contributor

Thanks for this @viniciussoares!

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.

2 participants