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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
28afbe46
Commit
28afbe46
authored
Feb 05, 2019
by
Roger Rüttimann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unnuesd global regex flag g
parent
3197cd9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/helpers/users_helper.rb
app/helpers/users_helper.rb
+1
-1
spec/helpers/users_helper_spec.rb
spec/helpers/users_helper_spec.rb
+1
-1
No files found.
app/helpers/users_helper.rb
View file @
28afbe46
...
...
@@ -30,7 +30,7 @@ module UsersHelper
pattern
,
options
=
if
settings
.
user_default_internal_regex_enabled?
regex
=
settings
.
user_default_internal_regex_instance
JsRegex
.
new
(
regex
,
options:
'g'
).
to_h
.
slice
(
:source
,
:options
).
values
JsRegex
.
new
(
regex
).
to_h
.
slice
(
:source
,
:options
).
values
end
{
user_internal_regex_pattern:
pattern
,
user_internal_regex_options:
options
}
...
...
spec/helpers/users_helper_spec.rb
View file @
28afbe46
...
...
@@ -51,7 +51,7 @@ describe UsersHelper do
false
|
'mockRegexPattern'
|
{
user_internal_regex_pattern:
nil
,
user_internal_regex_options:
nil
}
true
|
nil
|
{
user_internal_regex_pattern:
nil
,
user_internal_regex_options:
nil
}
true
|
''
|
{
user_internal_regex_pattern:
nil
,
user_internal_regex_options:
nil
}
true
|
'mockRegexPattern'
|
{
user_internal_regex_pattern:
'mockRegexPattern'
,
user_internal_regex_options:
'
g
i'
}
true
|
'mockRegexPattern'
|
{
user_internal_regex_pattern:
'mockRegexPattern'
,
user_internal_regex_options:
'i'
}
end
with_them
do
...
...
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