       (render-tag (eval element))
     (and (literal? tag) (map? attrs))
       (compile-partial-tag tag attrs content)
+    (and (literal? tag) (not (unknown? attrs)))
+      (compile-partial-tag tag {} (cons attrs content))
     :else
-      `(render-tag [~@(compile-html element)])))
+      `(render-tag
+         [~(first element)
+          ~@(for [x (rest element)]
+              (if (vector? x)
+                (compile-tag x)
+                x))])))
 
 (defn compile-html
   "Pre-compile data structures into HTML where possible."

      (for [[attr value] attrs]
        (cond
          (true? value) (format-attr attr attr)
          (not value)   ""
          :otherwise    (format-attr attr value))))))

(defvar- re-tag
  #"([^\s\.#]+)(?:#([^\s\.#]+))?(?:\.([^\s#]+))?"

  [data]
  (cond
    (vector? data) (render-tag data)
    (seq? data) (apply str (map render-html data))
    :else (as-str data)))

(defn- unknown?
  "True if the type of x is unknown, i.e. if x is an unevaluated form or
  symbol."
  [x]
  (or (symbol? x)
      (and (seq? x)
           (not= (first x) `quote))))

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

(declare compile-html)

