-(ns devtools.format
-  (:require
-    [devtools.debug :as debug]
-    ))
+(ns devtools.format)
 
 (def max-coll-elements 5)
 (def more-marker "…")

(defn managed-pr-str [value print-level]
  (let [tmpl (template span "")
        writer (TemplateWriter. tmpl)]
    (binding [*print-level* print-level] ; when printing do at most print-level deep recursion
      (pr-seq-writer [value] writer {:alt-impl     alt-printer-impl
                                     :print-length max-coll-elements
                                     :more-marker  more-marker}))

(defn body-api-call [value]
  (cond
    (satisfies? IDevtoolsFormat value) (-body value)
    (surrogate? value) (build-surrogate-body value)))