{"tests": [ {"description":"", "input":"", "output":["ParseError",["DOCTYPE", null, null, null, false]]}, {"description":"", "input":"", "output":[["DOCTYPE", "h", null, null, true]]}, {"description":"", "input":"", "output":[["DOCTYPE", "H", null, null, true]]}, {"description":"", "input":"", "output":[["DOCTYPE", "ht", null, null, true]]}, {"description":"", "input":"", "output":[["DOCTYPE", "Ht", null, null, true]]}, {"description":"", "input":"", "output":[["DOCTYPE", "hT", null, null, true]]}, {"description":"", "input":"", "output":[["DOCTYPE", "hT", null, null, true]]}, {"description":"", "input":"", "output":[["DOCTYPE", "htm", null, null, true]]}, {"description":"", "input":"", "output":[["DOCTYPE", "Htm", null, null, true]]}, {"description":"", "input":"", "output":[["DOCTYPE", "hTM", null, null, true]]}, {"description":"", "input":"", "output":[["DOCTYPE", "html5", null, null, true]]}, {"description":"PUBLIC\u0022\u0022", "input":"", "output":[["DOCTYPE", "html", "", null, true]]}, {"description":"PUBLIC''", "input":"", "output":[["DOCTYPE", "html", "", null, true]]}, {"description":"PUBLICbogus", "input":"", "output":["ParseError",["DOCTYPE", "html", null, null, false]]}, {"description":"PUBLIC bogus", "input":"", "output":["ParseError",["DOCTYPE", "html", null, null, false]]}, {"description":"PUBLIC \u0022\u0022bogus", "input":"", "output":["ParseError",["DOCTYPE", "html", "", null, false]]}, {"description":"PUBLIC \u0022\u0022 bogus", "input":"", "output":["ParseError",["DOCTYPE", "html", "", null, false]]}, {"description":"PUBLIC \u0022\u0022 \u0022\u0022bogus", "input":"", "output":["ParseError",["DOCTYPE", "html", "", "", false]]}, {"description":"PUBLIC \u0022\u0022 \u0022\u0022 bogus", "input":"", "output":["ParseError",["DOCTYPE", "html", "", "", false]]}, {"description":"PUBLIC \u0022\u0022\u0022\u0022>", "input":"", "output":[["DOCTYPE", "html", "", "", true]]}, {"description":"PUBLIC \u0022\u0022''>", "input":"", "output":[["DOCTYPE", "html", "", "", true]]}, {"description":"SYSTEM a", "input":"", "output":["ParseError", ["DOCTYPE", "html", null, null, false]]}, {"description":"", "input":"", "output":[["Comment", "-x"]]}, {"description":"", "input":"", "output":["ParseError", ["Comment", "--x"]]}, {"description":"non-PCDATA content model flag, start tag-like string", "contentModelFlags":["PLAINTEXT","RCDATA","CDATA"], "input":"
", "input":"&
",
"output":[["Character", "&"], ["StartTag", "p", {}]]},
{"description":"&&",
"input":"&&",
"output":[["Character", "&&"]]},
{"description":"&&",
"input":"&&",
"output":[["Character", "&&"]]},
{"description":"&",
"input":"&",
"output":[["Character", "&"]]},
{"description":"named character reference w/o refc",
"input":"&abc",
"output":["ParseError", ["Character", "&abc"]]},
{"description":"named character reference",
"input":"&abc",
"output":[["Character", "&abc"]]},
{"description":"named character reference w/o refc",
"input":"&abc",
"output":["ParseError", ["Character", "&abc"]]},
{"description":"unknown named character reference",
"input":"&abc;",
"output":["ParseError", ["Character", "&abc;"]]},
{"description":"named character reference w/o refc in attr",
"input":"",
"output":["ParseError", ["StartTag", "a", {"href": "&abc"}]]},
{"description":"named character reference in attr",
"input":"",
"output":[["StartTag", "a", {"href": "&abc"}]]},
{"description":"named character reference w/o refc in attr",
"input":"",
"output":["ParseError", ["StartTag", "a", {"href": "&abc"}]]},
{"description":"unknown named character reference in attr",
"input":"",
"output":["ParseError", ["StartTag", "a", {"href": "&abc;"}]]},
{"description":"cdata end tag containing <",
"contentModelFlags":["RCDATA","CDATA"],
"lastStartTag":"xxx",
"input":"",
"output":[["Character", ""]]},
{"description":"< in tag name state",
"input":" ",
"output":[["StartTag", "p