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
d0191e29
Commit
d0191e29
authored
Oct 15, 2018
by
Martin Wortschack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use literal instead of constructor for creating regex
parent
280a132e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
app/assets/javascripts/lib/utils/text_utility.js
app/assets/javascripts/lib/utils/text_utility.js
+1
-4
changelogs/unreleased/52686-project-slug-does-not-auto-populate-in-ie11.yml
...sed/52686-project-slug-does-not-auto-populate-in-ie11.yml
+5
-0
No files found.
app/assets/javascripts/lib/utils/text_utility.js
View file @
d0191e29
...
...
@@ -53,10 +53,7 @@ export const slugify = str => str.trim().toLowerCase();
* @param {String} str
* @returns {String}
*/
export
const
slugifyWithHyphens
=
str
=>
{
const
regex
=
new
RegExp
(
/
\s
+/
,
'
g
'
);
return
str
.
toLowerCase
().
replace
(
regex
,
'
-
'
);
};
export
const
slugifyWithHyphens
=
str
=>
str
.
toLowerCase
().
replace
(
/
\s
+/g
,
'
-
'
);
/**
* Truncates given text
...
...
changelogs/unreleased/52686-project-slug-does-not-auto-populate-in-ie11.yml
0 → 100644
View file @
d0191e29
---
title
:
Use literal instead of constructor for creating regex
merge_request
:
22367
author
:
type
:
other
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