summaryrefslogtreecommitdiff
path: root/app/helpers/blob_helper.rb
diff options
context:
space:
mode:
authorZertrin <zrk951@gmail.com>2014-10-21 09:59:03 +0200
committerMarc Gallet <mgallet@ffe.de>2014-11-18 12:55:22 +0100
commitb8fcaa7f4126ce2b5fe0436197b2aacc1be84e96 (patch)
treeef82829b07391f0193b63e2e2ae6b7f243a9cc6d /app/helpers/blob_helper.rb
parenta4e98f0ec985c91631f41c56317926f29365d95a (diff)
downloadgitlab-ce-b8fcaa7f4126ce2b5fe0436197b2aacc1be84e96.tar.gz
revert using the extension of the blob to determine the syntax highlighting language
nohighlight functionality for a hardcoded set of filenames is kept
Diffstat (limited to 'app/helpers/blob_helper.rb')
-rw-r--r--app/helpers/blob_helper.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb
index 11fbf1baae7..420ac3f77c7 100644
--- a/app/helpers/blob_helper.rb
+++ b/app/helpers/blob_helper.rb
@@ -1,14 +1,9 @@
module BlobHelper
def highlightjs_class(blob_name)
- if blob_name.include?('.')
- ext = blob_name.split('.').last
- return 'language-' + ext
+ if no_highlight_files.include?(blob_name.downcase)
+ 'no-highlight'
else
- if no_highlight_files.include?(blob_name.downcase)
- 'no-highlight'
- else
- blob_name.downcase
- end
+ blob_name.downcase
end
end