Skip to content

Commit 166d4ba

Browse files
committed
Allow filtering for pr-str viewer
1 parent 57f074a commit 166d4ba

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/portal/ui/viewer/code.cljs

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
(:require ["highlight.js" :as hljs]
33
[clojure.string :as str]
44
[portal.colors :as c]
5+
[portal.ui.filter :as f]
56
[portal.ui.html :as h]
67
[portal.ui.inspector :as ins]
78
[portal.ui.styled :as s]
@@ -115,7 +116,9 @@
115116
(hljs/highlight #js {:language "clojure"})
116117
.-value)]]))
117118

118-
(defn inspect-pr-str [value] [highlight-clj (pr-str value)])
119+
(defn inspect-pr-str [value]
120+
(let [search-text (ins/use-search-text)]
121+
[highlight-clj (pr-str (f/filter-value value search-text))]))
119122

120123
(defn inspect-code
121124
([code]

0 commit comments

Comments
 (0)