Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tokenizer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ tokens are:
["StartTag", name, {attributes}]
["EndTag", name]
["Comment", data]
["ProcessingInstruction", data]
["Character", data]

`public_id` and `system_id` are either strings or `null`. `correctness`
Expand Down
20 changes: 9 additions & 11 deletions tokenizer/test2.test
Original file line number Diff line number Diff line change
Expand Up @@ -183,19 +183,17 @@
{ "code": "invalid-first-character-of-tag-name", "line": 1, "col": 3 }
]},

{"description":"Simili processing instruction",
{"description":"Processing instruction",
"input":"<?namespace>",
"output":[["Comment", "?namespace"]],
"errors":[
{ "code": "unexpected-question-mark-instead-of-tag-name", "line": 1, "col": 2 }
]},
"output":[["ProcessingInstruction", "namespace", ""]]},

{"description":"A bogus comment stops at >, even if preceded by two dashes",
"input":"<?foo-->",
"output":[["Comment", "?foo--"]],
"errors":[
{ "code": "unexpected-question-mark-instead-of-tag-name", "line": 1, "col": 2 }
]},
{"description":"A processing instruction delimited by ?> doesn't contain the delimiting ?",
"input":"<?foo bar?>",
"output":[["ProcessingInstruction", "foo", "bar"]]},

{"description":"A processing instruction's data delimited by ?> contains the correct amount of ?",
"input":"<?foo bar??>",
"output":[["ProcessingInstruction", "foo", "bar?"]]},

{"description":"Unescaped <",
"input":"foo < bar",
Expand Down
Loading
Loading