 
 (defn wrap-line [text]
   ;; see http://rosettacode.org/wiki/Word_wrap#Clojure
-  (string/join "\n" (re-seq (re-pattern (str ".{1," line-length "}(?:\\s|\\z)")) text)))
+  (string/join newline (re-seq (re-pattern (str ".{1," line-length "}(?:\\s|\\z)")) text)))
 
 (defn- entry-heading-str
   [{:keys [creator title subtitles name-of-part source-publisher source-date]}]

  (let [title (layout/translations :catalog-custom)
        date (time.core/now)
        path-to-numbers (layout/path-to-number items)]
    (string/join "\n\n"
     [title
      (format "Stand %s" (time.format/unparse date-formatter date))
      query

             [walk :as walk]]
            [endophile.core :as endophile]))

(def ^:private newline "\r\n")
(def ^:private double-newline (str newline newline))

(defmulti to-text (fn [{:keys [tag attrs content]}] tag))

(defmethod to-text :a [{content :content {href :href} :attrs}]
  (if (not-empty content) content href))
(defmethod to-text :h1 [{content :content}] (str content double-newline))
(defmethod to-text :h2 [{content :content}] (str  content double-newline))
(defmethod to-text :h3 [{content :content}] (str  content double-newline))
(defmethod to-text :ul [{content :content}] [:list {:type "ul"} content])
(defmethod to-text :li [{content :content}] [:li content])
(defmethod to-text :br [_] newline)
(defmethod to-text :default [{content :content}] content) ; just assume :p

(defn- node? [node]
