fix: lowercased block content in search result

This commit is contained in:
Junyi Du
2022-01-12 13:52:11 +08:00
committed by Tienson Qin
parent 9270c79078
commit 4775be1baf
4 changed files with 16 additions and 7 deletions

View File

@@ -43,8 +43,8 @@
result []]
(if (and (seq words) content)
(let [word (first words)
lc-word (string/lower-case word)
lc-content (string/lower-case content)]
lc-word (util/search-normalize word)
lc-content (util/search-normalize content)]
(if-let [i (string/index-of lc-content lc-word)]
(recur (rest words)
(subs content (+ i (count word)))