     (let [text (-> text
                    (escape)
                    (linkify))
-          parts (clojure.string/split text #"\033\[")]
+          parts (string/split text #"\033\[")]
       (process-parts {} parts ""))))

(ns org.spootnik.om-warp.ansi)

(def colors
  ["black"


(defn get-classes
  [styles]
  (string/join " " (remove nil? (vals styles))))

(defn process-parts
  [styles [part & parts] done]
  (let [lines (string/split part "\n" -1)
        [_ codes text] (re-matches #"([\d;]+?)?m(.*)" (first lines))
        text           (str (or text (first lines))
                            (if (empty? (rest lines)) "" "\n")
                            (string/join "\n" (rest lines)))
        next-styles    (if (nil? codes)
                         {}
                         (apply merge (map (comp style int)
                                           (string/split codes ";"))))
        styles         (merge styles next-styles)
        classes        (get-classes styles)
        done           (if (empty? classes)
