Merge branch '52686-project-slug-does-not-auto-populate-in-ie11' into 'master'
Resolve "Project slug does not auto populate in IE11" Closes #52686 See merge request gitlab-org/gitlab-ce!22367
This commit is contained in:
commit
1dae485c7b
2 changed files with 6 additions and 4 deletions
|
@ -53,10 +53,7 @@ export const slugify = str => str.trim().toLowerCase();
|
||||||
* @param {String} str
|
* @param {String} str
|
||||||
* @returns {String}
|
* @returns {String}
|
||||||
*/
|
*/
|
||||||
export const slugifyWithHyphens = str => {
|
export const slugifyWithHyphens = str => str.toLowerCase().replace(/\s+/g, '-');
|
||||||
const regex = new RegExp(/\s+/, 'g');
|
|
||||||
return str.toLowerCase().replace(regex, '-');
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Truncates given text
|
* Truncates given text
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Use literal instead of constructor for creating regex
|
||||||
|
merge_request: 22367
|
||||||
|
author:
|
||||||
|
type: other
|
Loading…
Reference in a new issue