diff --git a/src/main/frontend/diff.cljs b/src/main/frontend/diff.cljs index 8523e53508..c0e15ac323 100644 --- a/src/main/frontend/diff.cljs +++ b/src/main/frontend/diff.cljs @@ -9,19 +9,6 @@ (-> ((gobj/get jsdiff "diffLines") s1 s2) bean/->clj)) -(defn diff-words - [s1 s2] - (-> ((gobj/get jsdiff "diffWords") s1 s2) - bean/->clj)) - -(defn removed? - [s1 s2] - (when (and s1 s2) - (let [diff-result (diff-words s1 s2)] - (->> diff-result - (some :removed) - (boolean))))) - ;; (find-position "** hello _w_" "hello w") (defn find-position [markup text] diff --git a/src/main/frontend/fs.cljs b/src/main/frontend/fs.cljs index 2c467a57dd..171954108c 100644 --- a/src/main/frontend/fs.cljs +++ b/src/main/frontend/fs.cljs @@ -5,7 +5,6 @@ [frontend.idb :as idb] [promesa.core :as p] [goog.object :as gobj] - [frontend.diff :as diff] [clojure.set :as set] [lambdaisland.glogi :as log] ["/frontend/utils" :as utils])) @@ -132,19 +131,6 @@ :else (js/window.pfs.readFile (str dir "/" path) option)))) -(defn diff-removed? - [format s1 s2] - (when (and s1 s2) - (let [diff-result (diff/diff-words s1 s2) - block-pattern (or (config/get-block-pattern format) "#")] - (some (fn [{:keys [removed value]}] - (and removed - value - ;; FIXME: not sure why this happened, it might be related to - ;; the async block operations (inserting blocks) - (not (set/superset? #{block-pattern "\n"} (set (distinct value)))))) - diff-result)))) - (defn write-file ([dir path content] (write-file dir path content nil))