The file editor includes all spaces when creating files
Problem
When creating a new file through the single file editor, it's far too easy to create a file with a rogue space at the end:
I confirm the rogue space here:
And when that file is used in www-gitlab-com CI jobs, specifically for the Release post, it leads to difficult to diagnose errors, ref https://gitlab.com/gitlab-com/www-gitlab-com/-/jobs/582043684#L74. Problem diagnosed with @fseifoddini .
How to replicate
Follow the documentation here: https://docs.gitlab.com/ee/user/project/repository/web_editor.html
- Create a new branch: https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-new-branch
- Create a new file: https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file
- Make sure to add a space at the end, per the screenshot above
Suggested solution:
Update the code to "strip off" trailing spaces.
Edited by Kai Armstrong

