HTML: Add spec comments to algorithms and improve correctness
This commit is contained in:
parent
fbaae88b65
commit
933bbb2804
3 changed files with 708 additions and 52 deletions
|
@ -17,4 +17,5 @@ export type ParseError = 'unexpected-null-character' |
|
|||
'abrupt-closing-of-empty-comment' |
|
||||
'eof-in-comment' |
|
||||
'missing-semicolon-after-character-reference' |
|
||||
'unknown-named-character-reference';
|
||||
'unknown-named-character-reference' |
|
||||
'missing-doctype-name';
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -26,6 +26,10 @@ export class DOCTYPEToken extends Token {
|
|||
this.appendToName(REPLACEMENT_CHARACTER);
|
||||
}
|
||||
|
||||
public setForceQuirks(): void {
|
||||
this.forceQuirks = true;
|
||||
}
|
||||
|
||||
public static createWithForcedQuirks(): DOCTYPEToken {
|
||||
return new DOCTYPEToken(undefined, undefined, undefined, true);
|
||||
}
|
||||
|
@ -34,6 +38,10 @@ export class DOCTYPEToken extends Token {
|
|||
return new DOCTYPEToken(name, undefined, undefined, undefined);
|
||||
}
|
||||
|
||||
public static createWithReplacementCharacter(): DOCTYPEToken {
|
||||
return new DOCTYPEToken(REPLACEMENT_CHARACTER, undefined, undefined, undefined);
|
||||
}
|
||||
|
||||
public override inspect(indent: number): string {
|
||||
return `DOCTYPEToken { '${this.name}' }`;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue