]> gitweb.factorcode.org Git - factor.git/commitdiff
chloe: make self-closing tags support more idiomatic Factor
authorBenjamin Pollack <benjamin@bitquabit.com>
Fri, 11 Mar 2016 18:12:26 +0000 (13:12 -0500)
committerBenjamin Pollack <benjamin@bitquabit.com>
Fri, 11 Mar 2016 18:13:43 +0000 (13:13 -0500)
basis/html/templates/chloe/compiler/compiler.factor

index 1d83a568da8bd00095b94331bd71171c6a0348a2..d18255e2fea01c4d8580a90cd059b69870245bc1 100644 (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