summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-10-13 12:32:35 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2016-10-13 14:16:35 -0500
commitf5de2ce3fd74af214556f677f54efa3f4da13ed3 (patch)
tree0edf872e4c129664468401f7619aab82521e8ee5 /app
parent3764fd4b4166bdf869cc04e4e82558d6b80b4ca5 (diff)
downloadgitlab-ce-f5de2ce3fd74af214556f677f54efa3f4da13ed3.tar.gz
Add syntax highlighting to files
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/merge_conflicts/components/diff_file_editor.js.es61
1 files changed, 1 insertions, 0 deletions
diff --git a/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js.es6 b/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js.es6
index 417095a8db7..3379414343f 100644
--- a/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js.es6
+++ b/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js.es6
@@ -55,6 +55,7 @@
this.fileLoaded = true;
this.editor = ace.edit(content);
this.editor.$blockScrolling = Infinity; // Turn off annoying warning
+ this.editor.getSession().setMode(`ace/mode/${file.blob_ace_mode}`);
this.editor.on('change', () => {
this.saveDiffResolution();
});