From 54771100eb8693c7fa06ea31041b0bd15f78dcc7 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 26 Aug 2015 11:34:28 -0700 Subject: 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. --- app/views/shared/_file_highlight.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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| -- cgit v1.2.1