Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tree-sitter-markdown/grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ module.exports = grammar({
)),
repeat1($._block),
common.EXTENSION_TASK_LIST ? prec(1, seq(
choice($.task_list_marker_checked, $.task_list_marker_unchecked),
choice($.task_list_marker_checked, $.task_list_marker_pending, $.task_list_marker_unchecked),
$._whitespace,
$.paragraph,
repeat($._block)
Expand All @@ -394,6 +394,7 @@ module.exports = grammar({
new RegExp('[^' + PUNCTUATION_CHARACTERS_REGEX + ' \\t\\n\\r]+'),
common.EXTENSION_TASK_LIST ? choice(
/\[[xX]\]/,
/\[[-]\]/,
/\[[ \t]\]/,
) : choice()
),
Expand All @@ -402,6 +403,7 @@ module.exports = grammar({

...(common.EXTENSION_TASK_LIST ? {
task_list_marker_checked: $ => prec(1, /\[[xX]\]/),
task_list_marker_pending: $ => prec(1, /\[[-]\]/),
task_list_marker_unchecked: $ => prec(1, /\[[ \t]\]/),
} : {}),

Expand Down
16 changes: 16 additions & 0 deletions tree-sitter-markdown/src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions tree-sitter-markdown/src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading