summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-08-26 11:34:28 -0700
committerRobert Speicher <rspeicher@gmail.com>2015-08-26 11:34:28 -0700
commit54771100eb8693c7fa06ea31041b0bd15f78dcc7 (patch)
treeda5081ad37236b864575471046c73944c47c71a6
parent7a81dc65d9013dff4d8bf36cf78e027693703990 (diff)
downloadgitlab-ce-54771100eb8693c7fa06ea31041b0bd15f78dcc7.tar.gz
Add user_color_scheme class to file_highlight
Prevents an unstyled flash that occurs when we were only applying the syntax highlighting class in Javascript. Now for these uncached blobs the server can add the syntax class, and for (possibly) cached fenced code blocks, the Javascript will add it as needed.
-rw-r--r--app/views/shared/_file_highlight.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/shared/_file_highlight.html.haml b/app/views/shared/_file_highlight.html.haml
index 7b1c624d769..57c3aff3e18 100644
--- a/app/views/shared/_file_highlight.html.haml
+++ b/app/views/shared/_file_highlight.html.haml
@@ -1,4 +1,4 @@
-.file-content.code.js-syntax-highlight
+.file-content.code.js-syntax-highlight{ class: user_color_scheme }
.line-numbers
- if blob.data.present?
- blob.data.lines.each_index do |index|