summaryrefslogtreecommitdiff
path: root/app/views/projects/blob/_editor.html.haml
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2015-12-14 18:14:07 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2015-12-14 18:22:28 -0200
commit5afe03315d12d1379c31a87a02fc9d9b6952f539 (patch)
tree180f790d751940e912a7b53ae925bf282aee3429 /app/views/projects/blob/_editor.html.haml
parentb95f7b1864672b873501792775521a6bd6393520 (diff)
downloadgitlab-ce-5afe03315d12d1379c31a87a02fc9d9b6952f539.tar.gz
Preserve trailing new lines at the end of file on the online editor
Because Haml automatically indents the HTML source code, the contents of whitespace-sensitive tags like pre and textarea can get screwed up.
Diffstat (limited to 'app/views/projects/blob/_editor.html.haml')
-rw-r--r--app/views/projects/blob/_editor.html.haml3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml
index 333f5d470ed..10b02813733 100644
--- a/app/views/projects/blob/_editor.html.haml
+++ b/app/views/projects/blob/_editor.html.haml
@@ -16,8 +16,7 @@
= select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'select2'
.file-content.code
- %pre.js-edit-mode-pane#editor
- = params[:content] || local_assigns[:blob_data]
+ %pre.js-edit-mode-pane#editor #{params[:content] || local_assigns[:blob_data]}
- if local_assigns[:path]
.js-edit-mode-pane#preview.hide
.center