Skip to content

Commit 9005943

Browse files
committed
fix: semicolons are optional in entities
1 parent 5ec927e commit 9005943

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ module.exports = grammar({
131131
// An entity can be named, numeric (decimal), or numeric (hexacecimal). The
132132
// longest entity name is 29 characters long, and the HTML spec says that
133133
// no more will ever be added.
134-
entity: _ => /&(#([xX][0-9a-fA-F]{1,6}|[0-9]{1,5})|[A-Za-z]{1,30});/,
134+
entity: _ => /&(#([xX][0-9a-fA-F]{1,6}|[0-9]{1,5})|[A-Za-z]{1,30});?/,
135135

136136
quoted_attribute_value: $ => choice(
137137
seq('\'', optional(alias(/[^']+/, $.attribute_value)), '\''),

0 commit comments

Comments
 (0)