                         (subs s (inc offset))]
                        [s nil]))))
                s)))))
-
-;;TODO: This is an oversimplied version. Needs to be fully implemented
-(defn- is-whitespace? [s]
-  (boolean
-    (#{\space \newline} s)))
 
 (defn- capitalize-word-writer
   "Returns a proxy that wraps writer, capitalizing all words"

                               defdirectives formatter-out]])
  (:require
    [cljs.core :refer [IWriter IDeref]]
    [clojure.string :as string])
  (:import [goog.string StringBuffer]))

(def ^:dynamic *out* nil)

            (-write writer
                    (capitalize-string (.toLowerCase s) @last-was-whitespace?))
            (when (pos? (.-length s))
              (reset! last-was-whitespace? (gstring/isEmptyOrWhitespace (nth s (dec (count s)))))))

          js/Number
          (let [c (char x)]
            (let [mod-c (if @last-was-whitespace? (string/upper-case c) c)]
              (-write writer mod-c)
              (reset! last-was-whitespace? (gstring/isEmptyOrWhitespace c)))))))))

(defn- init-cap-writer
  "Returns a proxy that wraps writer, capitalizing the first word"
