Handle void tags at EOF

This commit is contained in:
Max Brunsfeld 2018-06-12 14:06:16 -07:00
parent d257db6f66
commit 95b8b772d5
2 changed files with 18 additions and 0 deletions

View File

@ -77,6 +77,18 @@ Void tags
(attribute (attribute_name) (attribute_value))))
(end_tag (tag_name))))
==================================
Void tags at EOF
==================================
<img src="something.png">
---
(fragment
(element
(start_tag
(tag_name)
(attribute (attribute_name) (quoted_attribute_value (attribute_value))))))
==================================
Custom tags
==================================

6
src/scanner.cc vendored
View File

@ -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);