Commit b47933f8 authored by Stan Hu's avatar Stan Hu

Merge branch '42729-rubocop-regular-expression-check-is-breaking-master' into 'master'

Resolve "Rubocop regular expression check is breaking master"

Closes #42729

See merge request gitlab-org/gitlab-ce!16898
parents a00aed74 fac2047c
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment