Skip to content

Commit

Permalink
Improve regex to detect if fix, morph and data is used in flux (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
katauber committed Dec 17, 2021
1 parent f2de937 commit b819963
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cljs/metafacture_playground/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@
(defn- get-used-params [flux fix morph data]
(if flux
(let [flux (-> flux
(clj-str/replace "\n|" "|")
(clj-str/replace "\\s?\\|\\s?" "|"))
(clj-str/replace #"\n\|" "|")
(clj-str/replace #"\s*\|\s*" "|"))
fix-in-flux? (re-find #"\|fix\|" flux)
morph-in-flux? (re-find #"\|morph\|" flux)
data-in-flux? (re-find #"PG_DATA" flux)]
Expand Down

0 comments on commit b819963

Please sign in to comment.