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

@@ -14,7 +14,7 @@
(if-let [matches (seq (util/re-pos new-line-re-pattern content))]
(let [[start-pos content] (last matches)]
(+ start-pos (count content)))
(count (re-find re-pattern content)))
(count (util/safe-re-find re-pattern content)))
skip-marker-pos
(if-let [matches (seq (util/re-pos marker/bare-marker-pattern (subs content skip-hash-pos)))]
(let [[start-pos content] (last matches)]