mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 16:36:27 +00:00
fix: e2e tests
This commit is contained in:
@@ -262,16 +262,16 @@
|
||||
"Return hiccup of highlighted content FTS result"
|
||||
[content q]
|
||||
(when-not (or (string/blank? content) (string/blank? q))
|
||||
[:div (loop [content content ;; why recur? because there might be multiple matches
|
||||
result []]
|
||||
(let [[b-cut hl-cut e-cut] (text-util/cut-by content "$pfts_2lqh>$" "$<pfts_2lqh$")
|
||||
hiccups-add [[:span b-cut]
|
||||
[:mark.p-0.rounded-none hl-cut]]
|
||||
hiccups-add (remove nil? hiccups-add)
|
||||
new-result (concat result hiccups-add)]
|
||||
(if-not (string/blank? e-cut)
|
||||
(recur e-cut new-result)
|
||||
new-result)))]))
|
||||
[:span (loop [content content ;; why recur? because there might be multiple matches
|
||||
result []]
|
||||
(let [[b-cut hl-cut e-cut] (text-util/cut-by content "$pfts_2lqh>$" "$<pfts_2lqh$")
|
||||
hiccups-add [[:span b-cut]
|
||||
[:mark.p-0.rounded-none hl-cut]]
|
||||
hiccups-add (remove nil? hiccups-add)
|
||||
new-result (concat result hiccups-add)]
|
||||
(if-not (string/blank? e-cut)
|
||||
(recur e-cut new-result)
|
||||
new-result)))]))
|
||||
|
||||
(defn page-item
|
||||
[repo page input]
|
||||
@@ -288,7 +288,10 @@
|
||||
{:alias (:block/title source-page)})]
|
||||
(hash-map :icon icon
|
||||
:icon-theme :gray
|
||||
:text (highlight-content-query title input)
|
||||
:text (if (string/includes? title "$pfts_2lqh>$") ; sqlite matched
|
||||
[:span {"data-testid" title}
|
||||
(highlight-content-query title input)]
|
||||
title)
|
||||
:header (when (:block/parent entity)
|
||||
(block/breadcrumb {:disable-preview? true
|
||||
:search? true} repo (:block/uuid page)
|
||||
|
||||
Reference in New Issue
Block a user