<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -73,7 +73,7 @@
 (defn render-content
   &quot;Render the contents of a tag.&quot;
   [content]
-  (list*
+  (cons
     &quot;&gt;&quot;
     (render-html
       (if (map? (first content))
@@ -107,6 +107,14 @@
            (not (symbol? x)))
       (quoted? x)))
 
+(derive clojure.lang.IPersistentList ::form)
+(derive clojure.lang.Symbol ::form)
+
+(defmulti compile-html
+  &quot;Render a Clojure data structure to a seq of HTML at compile-time when
+  possible, at runtime when not.&quot;
+  type)
+
 (defn- collapse-strs
   &quot;Concatenate adjacent strings in a sequence.&quot;
   [coll]
@@ -118,63 +126,45 @@
     '()
     (reverse coll)))
 
-(defn build-seq
-  &quot;Create code that will build an output seq from a list of literals and
-  forms.&quot;
+(defn compile-seq
+  &quot;Compile a sequence of Clojure data structures into HTML&quot;
   [coll]
-  (let [coll (collapse-strs coll)]
-    (if (every? literal? coll)
-      coll
-     `((concat ~@(for [x coll]
-                   (if (literal? x)
-                     `(list ~x)
-                      x)))))))
-
-(defn wrap-list
-  &quot;Wrap a seq in an `list form if a bare list.&quot;
-  [coll]
-  (if (symbol? (first coll))
-    coll
-    `(list ~@coll)))
-
-(derive clojure.lang.IPersistentList ::form)
-(derive clojure.lang.Symbol ::form)
-
-(defmulti compile-html
-  &quot;Render a Clojure data structure to a seq of HTML at compile-time when
-  possible, at runtime when not.&quot;
-  type)
+  (let [forms (collapse-strs (mapcat compile-html coll))]
+    (if (every? literal? forms)
+      `(list ~@forms)
+      `(concat ~@(for [form forms]
+                   (if (literal? form)
+                     `(list ~form)
+                     form))))))
 
 (defn compile-tag
   &quot;Attempt to pre-render a HTML tag.&quot;
   [tag-name content]
   (if (literal? tag-name)
     (render-tag tag-name content)
-   `((render-tag ~tag-name ~content))))
+   `(render-tag ~tag-name ~(compile-seq content))))
 
 (defn compile-attrs
   &quot;Attempt to pre-render an attribute map.&quot;
   [attrs content]
   (if (map? attrs)
     (render-attrs attrs content)
-    (if (not (literal? attrs))
-     `((render-attrs ~attrs ~(wrap-list content)))
+    (if-not (literal? attrs)
+     `((render-attrs ~attrs ~(compile-seq content)))
       content)))
 
 (defn compile-content
   &quot;Attempt to pre-render the contents of a tag.&quot;
   [content]
-  (build-list
-    (cons
-      &quot;&gt;&quot;
-      (if (map? (first content))
+  (cons
+    &quot;&gt;&quot;
+    (cond
+      (map? (first content))
         (mapcat compile-html (rest content))
-        (if (literal? (first content))
-          (mapcat compile-html content)
-          (concat
-            (for [x (take 2 content)]
-              `(render-html ~x))
-            (map compile-html (drop 2 content))))))))
+      (literal? (first content))
+        (mapcat compile-html content)
+      :else
+        (list &quot;blah&quot;))))
 
 (defmethod compile-html ::vector
   [[tag &amp; content]]
@@ -184,9 +174,7 @@
 
 (defmethod compile-html ::form
   [form]
-  (if (quoted? form)
-    `((render-html ~(rest form)))
-    `((render-html ~form))))
+  `((render-html ~form)))
 
 (defmethod compile-html :default
   [x]
@@ -195,4 +183,4 @@
 (defmacro html
   &quot;Efficiently render a Clojure data structure into a seq of HTML.&quot;
   [&amp; content]
-  (wrap-list (build-list (mapcat compile-html content))))
+  (compile-seq content))</diff>
      <filename>src/hiccup.clj</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a060f278a09a8c7766ecf58cb2c3fa274c424ca4</id>
    </parent>
  </parents>
  <author>
    <name>weavejester</name>
    <email>jreeves@weavejester.com</email>
  </author>
  <url>http://github.com/weavejester/hiccup/commit/2cdeef96de30e17f72b4ccf62d6f360944636694</url>
  <id>2cdeef96de30e17f72b4ccf62d6f360944636694</id>
  <committed-date>2009-11-08T16:13:56-08:00</committed-date>
  <authored-date>2009-11-08T16:13:56-08:00</authored-date>
  <message>Factored main logic out of html macro</message>
  <tree>c9c752aa1cdf564bb7c5df904831be7ae923e489</tree>
  <committer>
    <name>weavejester</name>
    <email>jreeves@weavejester.com</email>
  </committer>
</commit>
