Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
fac2047c
Commit
fac2047c
authored
Feb 02, 2018
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use %r around multi-line regular expressions
parent
a00aed74
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/banzai/color_parser.rb
lib/banzai/color_parser.rb
+4
-4
No files found.
lib/banzai/color_parser.rb
View file @
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment