Permalink
Browse files

Fixes to xml formatter

  • Loading branch information...
1 parent 42ebc7e commit df2248cdb9217768b564b33a05fb0ebbf0906ecf @tomfaulhaber committed Jun 3, 2009
Showing with 10 additions and 2 deletions.
  1. +8 −0 com/infolace/explorer.clj
  2. +2 −2 com/infolace/xml.clj
@@ -236,5 +236,13 @@
(dosync (ref-set current-object (xml-convert build)))
(dosync (alter write-opts assoc :dispatch xml-dispatch))
+ (do
+ (doit build)
+
+ (dosync (ref-set current-object (xml-convert build)))
+ (dosync (alter write-opts assoc :dispatch xml-dispatch))
+ (dosync (alter write-opts assoc :length 1000)))
+
+ (dosync (alter write-opts dissoc :dispatch))
)
View
@@ -59,9 +59,9 @@
(let [tag-name (as-str tag)
xlated-attrs (map #(vector [(as-str (key %)) (as-str (val %))]) attrs)]
(if (seq contents)
- ((formatter-out "~<<~a~1:i~{ ~:_~<~{~a=\"~a\"~}~:>~}>~vi~{~_~w~}~0i~_</~a>~:>")
+ ((formatter-out "~<<~a~:i~{ ~<~{~a=\"~a\"~}~:>~^~:_~}>~vi~{~_~w~}~0i~_</~a>~:>")
[tag-name xlated-attrs *prxml-indent* contents tag-name])
- ((formatter-out "~<<~a~1:i~{~:_ ~<~{~a=\"~a\"~}~:>~}/>~:>") [tag-name xlated-attrs]))))
+ ((formatter-out "~<<~a~:i~{ ~<~{~a=\"~a\"~}~:>~^~:_~}/>~:>") [tag-name xlated-attrs]))))
(defmulti xml-dispatch class)

0 comments on commit df2248c

Please sign in to comment.