                 (do
                   (.append sb ch)
                   (recur state (.read rdr)))))))
+        (conj! template (.toString sb))
         (persistent! template))))
 
-
 #_(render (parse "home.html") {:name "Bob"})

             (if (= :value tag-type)
               {:tag-value (first content)}
               {:tag-name (first content)
                :params (rest content)})))))

#_(read-tag-info (java.io.StringReader. "% for i in nums %}"))
;{:params ("i" "in" "nums"), :tag-name "for", :tag-type :expr}

#_(read-tag-info (java.io.StringReader. "{ nums }}"))
;{:tag-value "nums", :tag-type :value}


(defn value-tag [{:keys [tag-value]}]  
  (let [value (map keyword (.split tag-value "\\."))]
    (fn [args] (get-in args value))))

#_((value-tag {:tag-value "foo.bar.baz"}) {:foo {:bar {:baz "ok"}}})
;ok
#_((value-tag {:tag-value "foo"}) {:foo "ok"})
;ok

