JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fix test serialization of templates
authorJason Woofenden <jason@jasonwoof.com>
Tue, 22 Dec 2015 22:37:55 +0000 (17:37 -0500)
committerJason Woofenden <jason@jasonwoof.com>
Tue, 22 Dec 2015 22:37:55 +0000 (17:37 -0500)
test.coffee

index 3098bbd..9fe1293 100644 (file)
@@ -7803,8 +7803,11 @@ serialize_els = (els, prefix = '| ') ->
                                attr_keys.sort() # TODO this should be "lexicographically by UTF-16 code unit"
                                for k in attr_keys
                                        ret += "#{prefix}  #{k}=\"#{el.attrs[k]}\"\n"
-                               # FIXME template shows as "content" with children below it
-                               ret += serialize_els el.children, "#{prefix}  "
+                               if el.name is 'template' # ?check ns
+                                       ret += "#{prefix}  content\n"
+                                       ret += serialize_els el.children, "#{prefix}    "
+                               else
+                                       ret += serialize_els el.children, "#{prefix}  "
                        when wheic.TYPE_TEXT
                                ret += "#{prefix}\"#{el.text}\"\n"
                        when wheic.TYPE_COMMENT