0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 00:40:30 -05:00

Improve color/hex? predicate.

This commit is contained in:
Andrey Antukh 2016-09-22 22:32:56 +03:00
parent 3584c1f59a
commit a95bd7f02a
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -49,4 +49,5 @@
(defn hex?
[v]
(not (nil? (re-find #"^#[0-9A-Fa-f]{6}$" v))))
(and (string? v)
(re-seq #"^#[0-9A-Fa-f]{6}$" v)))