Skip to content

Commit

Permalink
Merge pull request #12 from heyarne/bugfix/parse-css-with-whitespace
Browse files Browse the repository at this point in the history
Make parse-css insenstive to whitespace
  • Loading branch information
postspectacular committed Sep 13, 2020
2 parents 7e967e2 + 00bebfe commit c7fe893
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core.org
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@
[col]
(if (= \# (first col))
(hex->int col)
(let [[[_ mode a b c d]] (re-seq #"(rgb|hsl)a?\((\d+%?),(\d+%?),(\d+%?),?([0-9\.]+)?\)" col)]
(let [[[_ mode a b c d]] (re-seq #"(rgb|hsl)a?\((\d+%?),(\d+%?),(\d+%?),?([0-9\.]+)?\)" (str/replace col #"\s+" ""))]
(if mode
(if (#{"rgb" "rgba"} mode)
(RGBA.
Expand Down Expand Up @@ -1284,6 +1284,7 @@
[thi.ng.dstruct.streams :as streams]
[thi.ng.strf.core :as f]
[thi.ng.xerror.core :as err]
[clojure.string :as str]
#?(:clj [thi.ng.math.macros :as mm]
:cljs [thi.ng.typedarrays.core :as ta])))

Expand Down

0 comments on commit c7fe893

Please sign in to comment.