Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Primary navigation
Project
G
gitlabhq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
qa-perf-testing
gitlabhq
Merge requests
!9422
Search or go to…
#9035 + #5936 Preserve trailing new lines at the end of file
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
#9035 + #5936 Preserve trailing new lines at the end of file
github/fork/kylekatarnls/patch-2
into
master
Overview
7
Commits
1
Pipelines
0
Changes
1
Closed
Ramya Authappan
requested to merge
github/fork/kylekatarnls/patch-2
into
master
9 years ago
Overview
7
Commits
1
Pipelines
0
Changes
1
Expand
Created by: kylekatarnls
If the content end with a new line, add it as raw
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
5450437c
1 commit,
5 years ago
1 file
+
4
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
app/views/projects/blob/_editor.html.haml
+
4
−
1
Options
@@ -17,7 +17,10 @@
.file-content.code
%pre
.js-edit-mode-pane
#editor
=
params
[
:content
]
||
local_assigns
[
:blob_data
]
-
content
=
params
[
:content
]
||
local_assigns
[
:blob_data
]
=
content
-
if
content
.
length
&&
0
===
content
[
content
.
length
-
1
].
index
(
/[\r\n]/
)
!=
"
\n
"
-
if
local_assigns
[
:path
]
.js-edit-mode-pane
#preview
.hide
.center
Loading