 
 (defn- define-wdl []
   (js-invoke
-   (get-codemirror) "defineMode" "wdl"
+   @codemirror-instance "defineMode" "wdl"
    (fn []
      #js{:token (fn [stream]
                   (.eatSpace stream)

     (this :call-method "off" event-type listener))
   :call-method
   (fn [{:keys [locals]} method & args]
     (apply js-invoke (aget (:code-mirror-instance @locals) "doc") method args))
   :get-default-props
   (fn []
     {:line-numbers? true

   [broadfcui.utils :as utils]
   ))

(defonce ^:private codemirror-instance (atom false))

(defn- regex-escape [s]
  (clojure.string/replace s #"[\\\*\+\|\^]" #(str "\\" %)))
