diff --git a/corpus/main.txt b/corpus/main.txt index 0fc0aa8..10ad92c 100644 --- a/corpus/main.txt +++ b/corpus/main.txt @@ -77,6 +77,18 @@ Void tags (attribute (attribute_name) (attribute_value)))) (end_tag (tag_name)))) +================================== +Void tags at EOF +================================== + +--- + +(fragment + (element + (start_tag + (tag_name) + (attribute (attribute_name) (quoted_attribute_value (attribute_value)))))) + ================================== Custom tags ================================== diff --git a/src/scanner.cc b/src/scanner.cc index ff159b6..ad8dab7 100644 --- a/src/scanner.cc +++ b/src/scanner.cc @@ -223,6 +223,12 @@ struct Scanner { } break; + case '\0': + if (valid_symbols[IMPLICIT_END_TAG]) { + return scan_implicit_end_tag(lexer); + } + break; + case '/': if (valid_symbols[SELF_CLOSING_TAG_DELIMITER]) { return scan_self_closing_tag_delimiter(lexer);