Skip to content

Commit 2310cc3

Browse files
committed
fixed comment validation
1 parent af35fe4 commit 2310cc3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ts/SAXParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ export class SAXParser {
678678
}
679679
}
680680

681-
if (this.buffer.charAt(this.pointer) === '-') {
681+
if (comment.endsWith('-')) {
682682
// Edge case: comment ends with '-' before closing
683683
throw new Error('Malformed comment: comment cannot end with a "-" before closing "-->"');
684684
}

0 commit comments

Comments
 (0)