Permalink
Browse files

make xml-zip more tolerant on the type of :content

  • Loading branch information...
1 parent 6efdadc commit 3671abf215b01ad652321a93f40cf183dd6e8ec6 @cgrand cgrand committed Mar 28, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/net/cgrand/xml.clj
View
@@ -27,7 +27,7 @@
given a root element"
[root]
(z/zipper #(or (tag? %) (document? %))
- :content #(assoc %1 :content (and %2 (apply vector %2))) root))
+ (comp seq :content) #(assoc %1 :content %2) root))
(defn- insert-element [loc e]
(-> loc (z/append-child e) z/down z/rightmost))

0 comments on commit 3671abf

Please sign in to comment.