               :problem/regex-failure "Syntax error"
               :problem/unknown       "Spec failed"})
 
+(defn pprint-str
+  "Returns the pretty-printed string"
+  [x]
+  (pprint/write x :stream nil))
+
+(defn no-trailing-whitespace
+  "Given an potentially multi-line string, returns that string with all
+  trailing whitespace removed."
+  [s]
+  (->> s
+       string/split-lines
+       (map string/trimr)
+       (string/join "\n")))
+
 (defn indent
+  "Given an potentially multi-line string, returns that string indented by
+   'indent-level' spaces. Optionally, can indent first line and other lines
+   different amounts."
   ([s]
    (indent indent-level s))
   ([indent-level s]

       ::irrelevant))
   form))

(defn highlight-line [prefix replacement]
  (let [max-width (apply max (map #(count (str %)) (string/split-lines replacement)))]
    (indent (count (str prefix))
            (apply str (repeat max-width "^")))))


(def header-size 35)
(def section-size 25)
(def indent-level 2)

(def headers {:problem/missing-key   "Spec failed"
              :problem/not-in-set    "Spec failed"
