             [re-frame.core :refer [dispatch subscribe]]
             [re-complete.app :as complete-app]
             [replumb.ast :as ast]
-            [clojure.string :as str]))
+            [clojure.string :as str]
+            [replumb.ast :as ast]))
 
 (defn gist-showing?
   "Given a db, indicates if the gist login dialog is shown.

        other-items (sort (vec (clojure.set/difference (set items-to-sort) (set lower-case-items))))]
    (apply conj other-items (reverse lower-case-items))))

(defn create-dictionary [event console-key]
  (let [previous-input (subscribe [:get-previous-input console-key])
        options (subscribe [:get-options console-key])

;;;;;;;;;;;;;;;;;;;;;

(defn opening-excluded-chars [word excluded-chars]
  (let [starts-with-excluded-char? ((set excluded-chars) (first word))]
    (if starts-with-excluded-char?
      (opening-excluded-chars (apply str (rest word)) excluded-chars)
      word)))

(defn closing-excluded-chars [word excluded-chars]
  (let [ends-with-excluded-char? ((set excluded-chars) (last word))]
    (if ends-with-excluded-char?
      (closing-excluded-chars (apply str (butlast word)) excluded-chars)
      word)))

(defn current-word [previous-input input]
  (->> input
