@willbooster/tree-sitter-markdown 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -19,6 +19,7 @@ digits of an ordered list marker with `'0'` and `'9'` instead of calling `isdigi
19
19
  own ABI number (`0x57420001`) and load only with that fork's runtime, version 2.0.0 or later: upstream's tree-sitter
20
20
  runtime rejects them. They parse as the parsers in upstream's 0.5.3 packages do, with these exceptions:
21
21
 
22
+ - Link reference definitions labelled `[x]` or `[X]` are recognized even with task-list support enabled.
22
23
  - HTML declarations end on the first line containing `>`, leaving subsequent Markdown outside the HTML block.
23
24
  - Short HTML comments such as `<!-->` and `<!--->` end on their opening line. Malformed `<!-` prefixes remain ordinary text.
24
25
  - Block containers nest to a maximum depth of 255. Additional quote, list, code, or HTML block openers remain literal text inside the deepest container.
@@ -138,6 +139,7 @@ parser.set_language(&tree_sitter_md::LANGUAGE.into())?;
138
139
 
139
140
  The crate keeps the API of upstream's `tree-sitter-md` crate: `tree_sitter_md::INLINE_LANGUAGE` is the inline grammar,
140
141
  and the `parser` feature adds `MarkdownParser`, which parses a document with both grammars into a `MarkdownTree`.
142
+ The `parser` feature requires runtime version 2.0.18 or later, which supports UTF-8 characters split across short input chunks.
141
143
  `MarkdownCursor::field_name` returns a name that borrows from the tree (`Option<&'tree str>`), since the
142
144
  willbooster-tree-sitter runtime returns field names with that lifetime, where upstream's returns `Option<&'static str>`.
143
145
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-markdown",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Markdown grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -25,6 +25,9 @@ module.exports = grammar({
25
25
 
26
26
  ...common.rules,
27
27
  _last_token_punctuation: $ => choice(), // needed for compatability with common rules
28
+ link_label: $ => common.EXTENSION_TASK_LIST
29
+ ? choice(common.rules.link_label($), /\[[xX]\]/)
30
+ : common.rules.link_label($),
28
31
 
29
32
  // BLOCK STRUCTURE
30
33
 
@@ -592,6 +595,7 @@ module.exports = grammar({
592
595
  conflicts: $ => [
593
596
  [$.link_reference_definition],
594
597
  [$.link_label, $._line],
598
+ [$.link_label, $._word],
595
599
  [$.link_reference_definition, $._line],
596
600
  ],
597
601
  extras: $ => [],
Binary file
Binary file
package/tree-sitter.json CHANGED
@@ -30,7 +30,7 @@
30
30
  }
31
31
  ],
32
32
  "metadata": {
33
- "version": "1.0.6",
33
+ "version": "1.0.8",
34
34
  "license": "MIT",
35
35
  "description": "Markdown grammar for tree-sitter",
36
36
  "authors": [