mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 06:02:32 -05:00
Skip parsing on numbers
This commit is contained in:
parent
0684d893e0
commit
31674db11d
1 changed files with 5 additions and 4 deletions
|
@ -8,10 +8,11 @@
|
|||
#"^\s*(-?[0-9]+\.?[0-9]*)\s*$")
|
||||
|
||||
(defn parse-token-value [value]
|
||||
(when (string? value)
|
||||
(when-let [double-str (-> (re-find parseable-token-value-regexp value)
|
||||
(last))]
|
||||
(d/parse-double double-str))))
|
||||
(cond
|
||||
(number? value) value
|
||||
(string? value) (when-let [double-str (-> (re-find parseable-token-value-regexp value)
|
||||
(last))]
|
||||
(d/parse-double double-str))))
|
||||
|
||||
(defn find-token-references
|
||||
"Finds token reference values in `value-string` and returns a set with all contained namespaces."
|
||||
|
|
Loading…
Add table
Reference in a new issue