File tree Expand file tree Collapse file tree
src/main/frontend/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4949 [frontend.handler.property :as property-handler]
5050 [frontend.handler.property.util :as pu]
5151 [frontend.handler.route :as route-handler]
52+ [frontend.handler.search :as search-handler]
5253 [frontend.handler.ui :as ui-handler]
5354 [frontend.mixins :as mixins]
5455 [frontend.mobile.haptics :as haptics]
15441545 (hiccups.core/html )
15451546 (security/sanitize-html ))))
15461547
1548+ (defn- highlight-query-text
1549+ [content query]
1550+ (if (and (string? content)
1551+ (not (string/blank? query))
1552+ (string/includes? (string/lower-case content)
1553+ (string/lower-case query)))
1554+ (search-handler/highlight-exact-query content query)
1555+ content))
1556+
15471557(defn ^:large-vars/cleanup-todo inline
15481558 [{:keys [html-export?] :as config} item]
15491559 (match item
1550- [(:or " Plain" " Spaces" ) s]
1560+ [" Plain" s]
1561+ (highlight-query-text s (:highlight-query config))
1562+ [" Spaces" s]
15511563 s
15521564
15531565 [" Superscript" l]
Original file line number Diff line number Diff line change 8383 (set-has-references! result))))
8484 [])
8585 (when has-references?
86- [:div.unlinked-references
87- (views/view
88- {:view-parent entity
89- :view-feature-type :unlinked-references
90- :columns (views/build-columns config [] {})
91- :foldable-options {:default-collapsed? true }
92- :config config})]))))
86+ (let [config (assoc config :highlight-query (:block/title entity))]
87+ [:div.unlinked-references
88+ (views/view
89+ {:view-parent entity
90+ :view-feature-type :unlinked-references
91+ :columns (views/build-columns config [] {})
92+ :foldable-options {:default-collapsed? true }
93+ :config config})])))))
You can’t perform that action at this time.
0 commit comments