diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-02-03 00:25:24 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-02-03 00:25:24 +0100 |
commit | bf278f791b0f112c79e8cdeaa82db91ae2af4fe4 (patch) | |
tree | 8e1a6938053adf698a07802a714db69db8c82508 /lib | |
parent | effb96b98511711fe8797f46fe1add68b968694f (diff) | |
parent | a3166376bb50d84540ba2c60f5f5131ee211ffa8 (diff) | |
download | gitlab-ce-bf278f791b0f112c79e8cdeaa82db91ae2af4fe4.tar.gz |
Merge branch 'master' into 38175-add-domain-field-to-auto-devops-application-setting
Diffstat (limited to 'lib')
-rw-r--r-- | lib/banzai/color_parser.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/banzai/color_parser.rb b/lib/banzai/color_parser.rb index 0cd9085190c..355c364b07b 100644 --- a/lib/banzai/color_parser.rb +++ b/lib/banzai/color_parser.rb @@ -7,7 +7,7 @@ module Banzai DEGS = /-?\d+(?:deg)?/i # [-]digits[deg] RADS = /-?(?:\d+(?:\.\d+)?|\.\d+)rad/i # [-](digits[.digits] OR .digits)rad HEX_FORMAT = /\#(?:\h{3}|\h{4}|\h{6}|\h{8})/ - RGB_FORMAT = / + RGB_FORMAT = %r{ (?:rgba? \( (?: @@ -18,15 +18,15 @@ module Banzai #{ALPHA_CHANNEL} \) ) - /xi - HSL_FORMAT = / + }xi + HSL_FORMAT = %r{ (?:hsla? \( (?:#{DEGS}|#{RADS}),\s*#{PERCENTS},\s*#{PERCENTS} #{ALPHA_CHANNEL} \) ) - /xi + }xi FORMATS = [HEX_FORMAT, RGB_FORMAT, HSL_FORMAT].freeze |