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
Jérome Perrin
gitlab-ce
Commits
dae78a55
Commit
dae78a55
authored
Oct 03, 2017
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix linting errors in sprintf
parent
244f631e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
app/assets/javascripts/locale/sprintf.js
app/assets/javascripts/locale/sprintf.js
+10
-10
No files found.
app/assets/javascripts/locale/sprintf.js
View file @
dae78a55
...
@@ -12,15 +12,15 @@ import _ from 'underscore';
...
@@ -12,15 +12,15 @@ import _ from 'underscore';
@see https://gitlab.com/gitlab-org/gitlab-ce/issues/37992
@see https://gitlab.com/gitlab-org/gitlab-ce/issues/37992
**/
**/
export
default
(
input
,
parameters
,
escapeParameters
=
true
)
=>
{
export
default
(
input
,
parameters
,
escapeParameters
=
true
)
=>
{
let
output
=
input
;
let
output
=
input
;
if
(
parameters
)
{
if
(
parameters
)
{
Object
.
keys
(
parameters
).
forEach
((
parameterName
)
=>
{
Object
.
keys
(
parameters
).
forEach
((
parameterName
)
=>
{
const
parameterValue
=
parameters
[
parameterName
];
const
parameterValue
=
parameters
[
parameterName
];
const
escapedParameterValue
=
escapeParameters
?
_
.
escape
(
parameterValue
)
:
parameterValue
;
const
escapedParameterValue
=
escapeParameters
?
_
.
escape
(
parameterValue
)
:
parameterValue
;
output
=
output
.
replace
(
new
RegExp
(
`%{
${
parameterName
}
}`
,
'
g
'
),
escapedParameterValue
);
output
=
output
.
replace
(
new
RegExp
(
`%{
${
parameterName
}
}`
,
'
g
'
),
escapedParameterValue
);
});
});
}
}
return
output
;
return
output
;
}
}
;
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