chore: replace re-find with safe-re-find

This commit is contained in:
Tienson Qin
2021-05-23 12:58:41 +08:00
parent d256982c9c
commit 6c70914150
17 changed files with 61 additions and 51 deletions

View File

@@ -33,7 +33,7 @@
lc-content (string/lower-case content)
lc-q (string/lower-case q)]
(if (or (string/includes? lc-content lc-q)
(not (re-find #" " q)))
(not (util/safe-re-find #" " q)))
(let [i (string/index-of lc-content lc-q)
[before after] [(subs content 0 i) (subs content (+ i (count q)))]]
[:p