BigW Consortium Gitlab

Commit fac2047c by Douwe Maan

Use %r around multi-line regular expressions

parent a00aed74
......@@ -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