mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
Move find-token-references to token namespace
This commit is contained in:
@@ -4,6 +4,13 @@
|
||||
[clojure.set :as set]
|
||||
[cuerdas.core :as str]))
|
||||
|
||||
(defn find-token-references
|
||||
"Finds token reference values in `value-string` and returns a set with all contained namespaces."
|
||||
[value-string]
|
||||
(some->> (re-seq #"\{([^}]*)\}" value-string)
|
||||
(map second)
|
||||
(into #{})))
|
||||
|
||||
(defn token-identifier [{:keys [name] :as _token}]
|
||||
name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user