Add underscore notation [_] for unchecked task list items#87
Merged
dereuromark merged 1 commit intomasterfrom Mar 8, 2026
Merged
Add underscore notation [_] for unchecked task list items#87dereuromark merged 1 commit intomasterfrom
dereuromark merged 1 commit intomasterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #87 +/- ##
=========================================
Coverage 93.85% 93.85%
- Complexity 2133 2134 +1
=========================================
Files 77 77
Lines 5708 5708
=========================================
Hits 5357 5357
Misses 351 351 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Implements support for using underscore as an alternative to space for unchecked task list items: `[_]` is now equivalent to `[ ]`. This is useful for: - Mobile devices where spaces inside brackets are hard to type - Editors without monospaced fonts where `[ ]` may look ambiguous - Visual clarity as underscore resembles an empty checkbox Related to upstream discussion: jgm/djot#305 where jgm expressed support for this feature. Changes: - Update ListItem to explicitly handle underscore as unchecked marker - Add official tests for underscore notation - Add unit test in DjotConverterTest - Update syntax.md and enhancements.md documentation
7589e81 to
5c16296
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[_]as an alternative to space[ ]for unchecked task list itemsThe underscore notation is useful when:
[ ]may look ambiguousBoth notations are fully equivalent and can be mixed within the same list.
Changes
src/Node/Block/ListItem.php- Explicitly handle_as unchecked marker (equivalent to space)tests/official/task_lists.test- Add official test cases for underscore notationtests/TestCase/DjotConverterTest.php- Add unit testdocs/syntax.md- Document the featuredocs/enhancements.md- Add to enhancements tracking