@willbooster/tree-sitter-html 1.0.4 → 1.0.5

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,7 +19,8 @@ number, so it loads only with the WillBooster runtime, version 2.0.0 or later
19
19
  [@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter)); upstream's runtime rejects
20
20
  it. Input that contains NUL characters can parse to a different tree than with upstream's 0.23.2 parser, because the
21
21
  lexers that generator emits treat a NUL character as an ordinary character. This grammar also accepts literal `>`
22
- characters in text nodes, which upstream 0.23.2 rejects. Its scanner requires an HTML tag-name boundary after
22
+ characters and bare `&` in text nodes, which upstream 0.23.2 rejects. A bare `&` becomes its own `text` node beside
23
+ surrounding text, while character references remain `entity` nodes. Its scanner requires an HTML tag-name boundary after
23
24
  `</script` and `</style`, so longer names and overlapping prefixes remain raw text. Closing-name comparisons
24
25
  fold only ASCII letters, and embedded NUL characters remain part of raw-text content. Void elements close
25
26
  before following text, entities, and complete comments, which become siblings instead of children.
package/grammar.js CHANGED
@@ -134,6 +134,6 @@ module.exports = grammar({
134
134
  seq('"', optional(alias(/[^"]+/, $.attribute_value)), '"'),
135
135
  ),
136
136
 
137
- text: _ => /[^<&\s]([^<&]*[^<&\s])?/,
137
+ text: _ => /[^<&\s]([^<&]*[^<&\s])?|&/,
138
138
  },
139
139
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-html",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
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.4",
21
+ "version": "1.0.5",
22
22
  "license": "MIT",
23
23
  "description": "HTML grammar for tree-sitter",
24
24
  "authors": [