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
90e70f88
Commit
90e70f88
authored
Mar 22, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
286c7fe3
e14b4b05
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
app/assets/javascripts/ide/components/new_dropdown/modal.vue
app/assets/javascripts/ide/components/new_dropdown/modal.vue
+1
-1
changelogs/unreleased/57540-filename-trailing-space.yml
changelogs/unreleased/57540-filename-trailing-space.yml
+5
-0
spec/javascripts/ide/components/new_dropdown/modal_spec.js
spec/javascripts/ide/components/new_dropdown/modal_spec.js
+12
-0
No files found.
app/assets/javascripts/ide/components/new_dropdown/modal.vue
View file @
90e70f88
...
@@ -29,7 +29,7 @@ export default {
...
@@ -29,7 +29,7 @@ export default {
return
this
.
name
||
(
entryPath
?
`
${
entryPath
}
/`
:
''
);
return
this
.
name
||
(
entryPath
?
`
${
entryPath
}
/`
:
''
);
},
},
set
(
val
)
{
set
(
val
)
{
this
.
name
=
val
;
this
.
name
=
val
.
trim
()
;
},
},
},
},
modalTitle
()
{
modalTitle
()
{
...
...
changelogs/unreleased/57540-filename-trailing-space.yml
0 → 100644
View file @
90e70f88
---
title
:
Implemented whitespace-trimming for file names in Web IDE
merge_request
:
26270
author
:
type
:
fixed
spec/javascripts/ide/components/new_dropdown/modal_spec.js
View file @
90e70f88
...
@@ -109,6 +109,18 @@ describe('new file modal component', () => {
...
@@ -109,6 +109,18 @@ describe('new file modal component', () => {
expect
(
vm
.
entryName
).
toBe
(
'
index.js
'
);
expect
(
vm
.
entryName
).
toBe
(
'
index.js
'
);
});
});
it
(
'
removes leading/trailing spaces when found in the new name
'
,
()
=>
{
vm
.
entryName
=
'
index.js
'
;
expect
(
vm
.
entryName
).
toBe
(
'
index.js
'
);
});
it
(
'
does not remove internal spaces in the file name
'
,
()
=>
{
vm
.
entryName
=
'
In Praise of Idleness.txt
'
;
expect
(
vm
.
entryName
).
toBe
(
'
In Praise of Idleness.txt
'
);
});
});
});
});
});
...
...
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