@willbooster/tree-sitter-html 1.0.5 → 1.0.6

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
@@ -22,7 +22,11 @@ lexers that generator emits treat a NUL character as an ordinary character. This
22
22
  characters and bare `&` in text nodes, which upstream 0.23.2 rejects. A bare `&` becomes its own `text` node beside
23
23
  surrounding text, while character references remain `entity` nodes. Its scanner requires an HTML tag-name boundary after
24
24
  `</script` and `</style`, so longer names and overlapping prefixes remain raw text. Closing-name comparisons
25
- fold only ASCII letters, and embedded NUL characters remain part of raw-text content. Void elements close
25
+ fold only ASCII letters, and embedded NUL characters remain part of raw-text content. Script content follows
26
+ HTML escaped and double-escaped states, so closing-tag text inside a double escape remains raw text. A script that reaches
27
+ EOF while scanning raw content closes implicitly without an error: its `script_element` has no `end_tag` child, and its
28
+ remaining content stays available for JavaScript injection. Incomplete closing tags such as `</script` still report
29
+ recovery errors. Unterminated style elements still report an error. Void elements close
26
30
  before following text, entities, and complete comments, which become siblings instead of children.
27
31
  Scanner serialization stores the open-tag stack from its innermost tag, compressing runs of identical tags, so active
28
32
  void, script, and style elements retain their identities when deeply nested. When deep nesting of distinct tags
package/grammar.js CHANGED
@@ -62,7 +62,7 @@ module.exports = grammar({
62
62
  script_element: $ => seq(
63
63
  alias($.script_start_tag, $.start_tag),
64
64
  optional($.raw_text),
65
- $.end_tag,
65
+ choice($.end_tag, $._implicit_end_tag),
66
66
  ),
67
67
 
68
68
  style_element: $ => seq(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-html",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "HTML grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
Binary file
package/tree-sitter.json CHANGED
@@ -18,7 +18,7 @@
18
18
  }
19
19
  ],
20
20
  "metadata": {
21
- "version": "1.0.5",
21
+ "version": "1.0.6",
22
22
  "license": "MIT",
23
23
  "description": "HTML grammar for tree-sitter",
24
24
  "authors": [