from the spec GitHub Flavored Markdown Spec I didn’t see any adjustment to a task item such that they should be parsed differently than normal list items besides the initial task marker.
but @lezer/markdown does parse it differently,
see playground link where for the markdown
- text
~~~js
console.log("hello")
~~~
<!-- -->
- [X] text
~~~js
console.log("hello")
~~~
text in the first list a paragraph is but text in the second list only part of the task is and not its own node.
see Document(BulletList(ListItem(ListMark,Paragraph,FencedCode(CodeMark,CodeInfo,CodeText,CodeMark))),CommentBlock,BulletList(ListItem(ListMark,Task(TaskMarker),FencedCode(CodeMark,CodeInfo,CodeText,CodeMark)))) as the tree.toString() output.
is there any reason to this? as this makes using the parser a bit more awkward.