Skip to content

Commit 755c2e2

Browse files
committed
Support loose attribute value
1 parent cbb91a0 commit 755c2e2

File tree

7 files changed

+304
-100
lines changed

7 files changed

+304
-100
lines changed

grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ module.exports = grammar({
124124

125125
attribute_name: _ => /[^<>"'/=\s]+/,
126126

127-
attribute_value: _ => /[^<>"'=\s]+/,
127+
attribute_value: _ => /[^<>"'=\s][^>\s]*/,
128128

129129
// An entity can be named, numeric (decimal), or numeric (hexacecimal). The
130130
// longest entity name is 29 characters long, and the HTML spec says that

src/grammar.json

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/node-types.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/parser.c

Lines changed: 19 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/tree_sitter/array.h

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/tree_sitter/parser.h

Lines changed: 27 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)