gitlab-org--gitlab-foss/app/views/projects/blob/_editor.html.haml
Douglas Barbosa Alexandre 5afe03315d 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.
2015-12-14 18:22:28 -02:00

24 lines
771 B
Text

.file-holder.file.append-bottom-default
.file-title.clearfix
.editor-ref
= icon('code-fork')
= ref
%span.editor-file-name
= @path
- if current_action?(:new) || current_action?(:create)
%span.editor-file-name
\/
= text_field_tag 'file_name', params[:file_name], placeholder: "File name",
required: true, class: 'form-control new-file-name js-quick-submit'
.pull-right
= 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]}
- if local_assigns[:path]
.js-edit-mode-pane#preview.hide
.center
%h2
%i.icon-spinner.icon-spin