Skip to content

Commit

Permalink
match only when starts and ends with [[ and not when wrapped in, cloj…
Browse files Browse the repository at this point in the history
…urescript not clojure
  • Loading branch information
sid597 committed Feb 26, 2024
1 parent cfc5726 commit 7c65882
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/ui/utils.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@
uid)))

(defn is-a-page? [s]
(second (re-find #"\A\[\[(.+)\]\]\z" (clojure.string/trim s))))
(second (re-find #"^\[\[(.+)\]\]$" (clojure.string/trim s))))

(comment (is-a-page? " [[[[ISS]] - scope other options for the LLM chat interface]]"))


(defn extract-from-code-block [s]
(let [pattern #"(?s)```javascript\n \n(.*?)\n```"
Expand Down

0 comments on commit 7c65882

Please sign in to comment.