diff --git a/corpus/main.txt b/corpus/main.txt index 35eba08..02232f3 100644 --- a/corpus/main.txt +++ b/corpus/main.txt @@ -161,9 +161,11 @@ Raw text elements (raw_text) (end_tag (tag_name))) (text) - (ERROR + (script_element (start_tag (tag_name)) - (raw_text))) + (raw_text) + (end_tag (tag_name))) + (text)) ================================== All-caps doctype diff --git a/src/scanner.cc b/src/scanner.cc index bb2f7ec..515f86e 100644 --- a/src/scanner.cc +++ b/src/scanner.cc @@ -123,12 +123,12 @@ struct Scanner { lexer->mark_end(lexer); const string &end_delimiter = tags.back().type == SCRIPT - ? "lookahead) { - if (lexer->lookahead == end_delimiter[delimiter_index]) { + if (towupper(lexer->lookahead) == end_delimiter[delimiter_index]) { delimiter_index++; if (delimiter_index == end_delimiter.size()) break; lexer->advance(lexer, false);