             ~(str "</" tag ">"))
       `(str "<" ~tag ~(compile-attrs attrs) ~(tag-end)))))
 
-(defn compile-lit-tag
+(defn- compile-lit-tag
   "Compile an element when only the tag is literal."
   [tag [attrs & content :as element]]
   (let [[tag tag-attrs _] (parse-element [tag])]
     `(if (map? ~attrs)
        ~(if (or content (container-tags tag))
-          `(str ~(str "<" tag) (render-attrs (merge ~tag-attrs ~attrs)) ">"
+          `(str ~(str "<" tag) (#'render-attrs (merge ~tag-attrs ~attrs)) ">"
                 ~@(compile-html content)
                 ~(str "</" tag ">"))
-          `(str ~(str "<" tag) (render-attrs (merge ~tag-attrs ~attrs))
+          `(str ~(str "<" tag) (#'render-attrs (merge ~tag-attrs ~attrs))
                 ~(tag-end)))
        ~(if (or element (container-tags tag))
           `(str ~(str "<" tag (render-attrs tag-attrs) ">")

  (if-let [hint (-> x meta :tag)]
    (isa? (eval hint) type)))

(defn literal?
  "True if x is a literal value that can be rendered as-is."
  [x]
  (and (not (uneval? x))

  [name value]
  (str " " (as-str name) "=\"" (escape-html value) "\""))

(defn- render-attrs
  "Turn a map into a string of sorted HTML attributes."
  [attrs]
  (apply str
