 (def dq "\"")
 (def surrogate-key "$$surrogate")
 (def standard-ol-style "list-style-type:none; padding-left:0px; margin-top:0px; margin-bottom:0px; margin-left:12px")
+(def standard-ol-no-margin-style "list-style-type:none; padding-left:0px; margin-top:0px; margin-bottom:0px; margin-left:0px")
 (def standard-li-style "margin-left:12px")
+(def standard-li-no-margin-style "margin-left:0px")
 (def spacer " ")
 (def span "span")
 (def ol "ol")

(defn build-header [value]
  (managed-pr-str value general-cljs-land-style 2))

(defn standard-body-template [lines]
  (template ol standard-ol-style (map #(template li standard-li-style %) lines)))

(defn body-line-template [index value]
  [(index-template index) spacer (managed-pr-str value (if cljs-value? general-cljs-land-style "") 3)])

(defn body-lines-templates [value]
  (loop [data (take 100 (seq value))                        ; TODO: generate "more" links for continuation
         index 0
         lines []]
    (if (empty? data)
      lines
      (recur (rest data) (inc index) (conj lines (body-line-template index (first data)))))))

(defn build-body [value]
  (standard-body-template (body-lines-templates value)))

(defn build-surrogate-body [value]
  (if-let [body-template (aget value "bodyTemplate")]
    body-template
    (let [target (aget value "target")]
      (if (seqable? target)
        (build-body target)
        (template ol standard-ol-style (template li standard-li-style (reference target (str target))))))))

(defn want-value? [value]


(def max-coll-elements 5)
(def more-marker "…")
(def max-number-body-items 100)
(def body-items-more-label "more…")
(def string-prefix-limit 20)
(def string-postfix-limit 20)
(def string-abbreviation-marker " … ")
