fix: ask the permission when refreshing local graph

This commit is contained in:
Tienson Qin
2020-12-06 11:06:27 +08:00
parent 0c4407d191
commit 45b318e2f8
6 changed files with 46 additions and 17 deletions

View File

@@ -9,6 +9,19 @@
(-> ((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]