Skip to content

Commit dd98216

Browse files
committed
Fix: bugs about special behavior in attributes
1 parent ca26f88 commit dd98216

File tree

4 files changed

+723
-3
lines changed

4 files changed

+723
-3
lines changed

src/html/tokenizer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1523,6 +1523,9 @@ export class Tokenizer {
15231523
const semi = text.endsWith(";")
15241524
const next = this.text.codePointAt(this.offset + 1)
15251525

1526+
this.offset += length - 1
1527+
this.column += length - 1
1528+
15261529
if (this.returnState.startsWith("ATTR") &&
15271530
!semi &&
15281531
next != null &&
@@ -1536,9 +1539,6 @@ export class Tokenizer {
15361539
if (!semi) {
15371540
this.reportParseError("missing-semicolon-after-character-reference")
15381541
}
1539-
1540-
this.offset += length - 1
1541-
this.column += length - 1
15421542
this.buffer = codepoints
15431543
}
15441544

0 commit comments

Comments
 (0)