Repository navigation
Preserve task markers in indented list code - #451
Merged
chrisjsewell merged 7 commits intoNov 9, 2026
Merged
Conversation
The gfm-like2 preset enables linkify, so these tests disable it when linkify-it-py is missing, as test_fixtures.py and test_main.py do.
Member
|
Merged in 01d077a, thanks @AryanRG! This was a real bug in the task-list support, and the fix was in the right place: its output matches cmark-gfm and the mdit-py-plugins tasklists plugin. Before merging I merged |
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.
With task lists enabled, checkbox-like text at the start of an indented code block inside a list item is consumed as a task marker. For example, a list item containing literal [x] code loses those characters in both the code token and rendered HTML, and gains a checkbox. GFM task markers apply when the first block is a paragraph, not an indented code block.
Check whether the item is an indented code block after its indentation state is established and before consuming a task marker. This preserves literal code while leaving ordinary task items unchanged. Add boundary regressions and an Unreleased changelog note.
Validation:
AI assistance was used to investigate, implement, test, and review this change.