                   
                   (and (re-matches #"\{%\s*block.*" tag-str)
                        (= block-name (get-tag-name #"block" tag-str)))
-                  (.append buf (->buf [block-buf] (consume-block rdr block-buf)))
+                  (do
+                    (.append buf tag-str)
+                    (.append buf (->buf [block-buf] (consume-block rdr block-buf))))
                   
                   :else
                   (.append buf tag-str)))


#_(println "\n-----------\n" (preprocess-template "templates/inheritance/inherit-c.html"))


          (read-char rdr))
        templates))))

(defn consume-block [rdr & [buf]]
  (loop [ch (read-char rdr)
         blocks-to-close 1]
    (when (and (pos? blocks-to-close) ch)
      (if (= *tag-open* ch)
        (let [content (read-tag-content rdr)]
          (when buf (.append buf content))
          (recur (read-char rdr) 
                 (cond 
