diff --git a/corpus/main.txt b/corpus/main.txt index fc78cb5..02232f3 100644 --- a/corpus/main.txt +++ b/corpus/main.txt @@ -145,6 +145,9 @@ Raw text elements + + --- (fragment @@ -157,6 +160,11 @@ Raw text elements (start_tag (tag_name)) (raw_text) (end_tag (tag_name))) + (text) + (script_element + (start_tag (tag_name)) + (raw_text) + (end_tag (tag_name))) (text)) ================================== 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);