File tree Expand file tree Collapse file tree 5 files changed +2009
-4
lines changed
test/fixtures/ast/html-entities-lone-amp Expand file tree Collapse file tree 5 files changed +2009
-4
lines changed Original file line number Diff line number Diff line change @@ -1610,14 +1610,14 @@ export class Tokenizer {
1610
1610
this . crStartOffset = this . offset - 1
1611
1611
this . buffer = [ AMPERSAND ]
1612
1612
1613
- if ( isWhitespace ( cp ) || cp === LESS_THAN_SIGN || cp === EOF ) {
1614
- return this . reconsumeAs ( "CHARACTER_REFERENCE_END " )
1613
+ if ( isDigit ( cp ) || isLetter ( cp ) ) {
1614
+ return this . reconsumeAs ( "NAMED_CHARACTER_REFERENCE " )
1615
1615
}
1616
1616
if ( cp === NUMBER_SIGN ) {
1617
1617
this . buffer . push ( cp )
1618
1618
return "NUMERIC_CHARACTER_REFERENCE"
1619
1619
}
1620
- return this . reconsumeAs ( "NAMED_CHARACTER_REFERENCE " )
1620
+ return this . reconsumeAs ( "CHARACTER_REFERENCE_END " )
1621
1621
}
1622
1622
1623
1623
/**
@@ -1818,7 +1818,7 @@ export class Tokenizer {
1818
1818
}
1819
1819
1820
1820
/**
1821
- * https://html.spec.whatwg.org/multipage/parsing.html#character-reference-end-state
1821
+ * https://html.spec.whatwg.org/multipage/parsing.html#flush-code-points-consumed-as-a-character-reference
1822
1822
* @param cp The current code point.
1823
1823
* @returns The next state.
1824
1824
*/
You can’t perform that action at this time.
0 commit comments