   (parser "<hello>world >>> xx bb</hello>")
   (parser template)
   (parser template-1)
-  (let [nodes (tr/transform {:tags           (fun ([& rest] rest))
-                             :close-tag      (fun
-                                               ([[:name "fragment"]]
-                                                 nil)
-                                               ([[:name close-tag-name]]
-                                                 [:text (str "</" close-tag-name ">")]))
-                             :arg            (fn [arg] arg)
-                             :arg-with-value (fun ([[:name name] [:arg-value arg-value]] {:name  name
-                                                                                          :value arg-value}))
-                             :arg-no-value   (fun ([[:name name]] {:name  name
-                                                                   :value nil}))
-                             :tag            (fun ([[:name "slot"] & args] {:slot (into {} args)})
-                                                  ([[:name "fragment"] & args] {:fragment (into {} args)})
-                                                  ([[:name tag-name] & args]
-                                                    [:text (str "<" tag-name (add-leading-space
-                                                                               (args-to-string args)) ">")]))
-                             :closed-tag     (fun ([[:name "slot"] & args] {:slot (into {} args)})
-                                                  ([[:name "fragment"] & args] {:fragment (into {} args)})
-                                                  ([[:name tag-name] & args]
-                                                    [:text (str "<" tag-name (add-leading-space
-                                                                               (args-to-string args)) "/>")]))
+  (let [nodes (tr/transform {:tags            (fun ([& rest] rest))
+                             :close-tag       (fun
+                                                ([[:name "fragment"]]
+                                                  nil)
+                                                ([[:name close-tag-name]]
+                                                  [:text (str "</" close-tag-name ">")]))
+                             :attr            (fn [attr] attr)
+                             :attr-with-value (fun ([[:name name] [:attr-value attr-value]] {:name  name
+                                                                                             :value attr-value}))
+                             :attr-no-value   (fun ([[:name name]] {:name  name
+                                                                    :value nil}))
+                             :tag             (fun ([[:name "slot"] & attrs] {:slot (into {} attrs)})
+                                                   ([[:name "fragment"] & attrs] {:fragment (into {} attrs)})
+                                                   ([[:name tag-name] & attrs]
+                                                     [:text (str "<" tag-name (add-leading-space
+                                                                                (attrs-to-string attrs)) ">")]))
+                             :closed-tag      (fun ([[:name "slot"] & attrs] {:slot (into {} attrs)})
+                                                   ([[:name "fragment"] & attrs] {:fragment (into {} attrs)})
+                                                   ([[:name tag-name] & attrs]
+                                                     [:text (str "<" tag-name (add-leading-space
+                                                                                (attrs-to-string attrs)) "/>")]))
                              }
                             (parser template-1))]
 

              "
              tags             = (tag | close-tag | closed-tag | text)*
              close-tag        = <'</'> name <'>'>
              closed-tag       = <'<'> name arg* <'/>'>
              tag              = <'<'> name arg* <'>'>
              arg              = arg-with-value | arg-no-value
              arg-with-value   = name <'='> arg-value
              arg-no-value     = name
              arg-value        = <quote> #'[^\"]*' <quote>
              quote            = #'\"'
              name             = #'[a-zA-Z0-9!-]+'
              text             = #'[^<]*'


(defrecord Fragment [src primary? async? fallback-src])

(defun attr-to-string
       ([{:name name :value nil}] name)
       ([{:name name :value value}] (str name "=\"" value "\"")))

(defn attrs-to-string [attrs]
  (->> attrs
       (map (fn [attr] (attr-to-string attr)))
       (str/join " ")))

(defn add-leading-space [s]
