chloe: make self-closing tags support more idiomatic Factor

db4
Benjamin Pollack 2016-03-11 13:12:26 -05:00
parent bbc5fe4b5b
commit 512014a436
1 changed files with 4 additions and 3 deletions

View File

@ -99,9 +99,10 @@ CONSTANT: self-closing-tags {
string-context? get [ tag-not-allowed-here ] when ;
: (compile-tag) ( tag -- )
dup name>string >lower self-closing-tags in?
[ compile-self-closing-tag ]
[
dup name>string >lower self-closing-tags
member? [
compile-self-closing-tag
] [
[ compile-start-tag ]
[ compile-children ]
[ compile-end-tag ] tri