@willbooster/tree-sitter-html 7.0.1 → 7.0.2

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
@@ -5,7 +5,7 @@
5
5
  [![Test](https://github.com/WillBooster/tree-sitter-html/actions/workflows/test.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-html/actions/workflows/test.yml)
6
6
  [![Test rust](https://github.com/WillBooster/tree-sitter-html/actions/workflows/test-rust.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-html/actions/workflows/test-rust.yml)
7
7
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
8
- [![wbfy](https://img.shields.io/badge/wbfy-20.43.2-1e90ff.svg)](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
8
+ [![wbfy](https://img.shields.io/badge/wbfy-20.45.0-1e90ff.svg)](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
9
9
  [![crates.io](https://img.shields.io/crates/v/willbooster-tree-sitter-html.svg)](https://crates.io/crates/willbooster-tree-sitter-html)
10
10
 
11
11
  HTML grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter), forked from
@@ -29,7 +29,11 @@ and instructions stay `text`, while character references remain `entity` nodes.
29
29
  `noembed`, and `noframes` also stays `text` up to the element's own closing tag. `plaintext` retains all remaining
30
30
  input as `text`, including closing tags. The grammar's scanner requires an HTML tag-name boundary after
31
31
  `</script` and `</style`, so longer names and overlapping prefixes remain raw text. Closing-name comparisons
32
- fold only ASCII letters, and embedded NUL characters remain part of raw-text content. In the HTML namespace, a trailing
32
+ fold only ASCII letters, and embedded NUL characters remain part of raw-text content. Tag names start with an ASCII
33
+ letter and retain subsequent characters, including Unicode, until HTML whitespace, `/`, `>`, NUL or end of input.
34
+ Name recognition is independent of platform locale and custom-element registration. NUL retains the existing
35
+ name boundary instead of the HTML tokenizer's replacement-character behavior.
36
+ In the HTML namespace, a trailing
33
37
  slash on a `script` or `style` opening tag remains part of its `start_tag`; it does not close the element, so subsequent
34
38
  content remains raw text until the matching end tag. Self-closing foreign-namespace `script` and `style` use ordinary element nodes. Complete foreign
35
39
  elements retain raw-text nodes and injection ranges, including CDATA delimiters. MathML `annotation-xml` with an `encoding` value of `text/html` or `application/xhtml+xml`
package/grammar.js CHANGED
@@ -32,6 +32,8 @@ module.exports = grammar({
32
32
  $._unquoted_attribute_entity,
33
33
  $._attribute_ampersand,
34
34
  $._unquoted_attribute_fragment,
35
+ $._discarded_start_tag,
36
+ $._missing_start_tag_end,
35
37
  ],
36
38
 
37
39
  rules: {
@@ -52,6 +54,7 @@ module.exports = grammar({
52
54
  $.doctype,
53
55
  $.processing_instruction,
54
56
  seq($._unfinished_processing_instruction, '>'),
57
+ seq('<', $._discarded_start_tag, alias($._missing_start_tag_end, '>')),
55
58
  alias($._element_text, $.text),
56
59
  $.comment,
57
60
  $.entity,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-html",
3
- "version": "7.0.1",
3
+ "version": "7.0.2",
4
4
  "description": "HTML grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -55,7 +55,7 @@
55
55
  "oxlint-tsgolint": "7.0.2004",
56
56
  "playwright": "1.64.0",
57
57
  "semantic-release": "25.0.9",
58
- "sort-package-json": "4.0.0",
58
+ "sort-package-json": "4.1.0",
59
59
  "vitest": "5.0.3",
60
60
  "wrangler": "4.149.0"
61
61
  },
Binary file
package/tree-sitter.json CHANGED
@@ -20,7 +20,7 @@
20
20
  }
21
21
  ],
22
22
  "metadata": {
23
- "version": "7.0.1",
23
+ "version": "7.0.2",
24
24
  "license": "MIT",
25
25
  "description": "HTML grammar for tree-sitter",
26
26
  "authors": [