Skip to content

Commit

Permalink
Revert backslash escape logic in quoted attributes…
Browse files Browse the repository at this point in the history
…since they don't exist.
  • Loading branch information
savetheclocktower committed Jul 20, 2024
1 parent a31cf14 commit 4b0e14a
Show file tree
Hide file tree
Showing 3 changed files with 2,093 additions and 2,147 deletions.
12 changes: 4 additions & 8 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,17 @@ module.exports = grammar(HTML, {

_single_quoted_attribute_value: $ => repeat1(
choice(
// Either any escaped character…
token(/\\./),
// …or any random non-expression piece of string…
/[^\\{']+/,
// Either any random non-expression piece of string…
/[^{']+/,
// …or an expression.
$.expression,
),
),

_double_quoted_attribute_value: $ => repeat1(
choice(
// Either any escaped character…
token(/\\./),
// …or any random non-expression piece of string…
/[^\\{"]+/,
// Either any random non-expression piece of string…
/[^{"]+/,
// …or an expression.
$.expression,
),
Expand Down
18 changes: 2 additions & 16 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4b0e14a

Please sign in to comment.