diff options
author | Zertrin <zrk951@gmail.com> | 2014-10-21 09:59:03 +0200 |
---|---|---|
committer | Marc Gallet <mgallet@ffe.de> | 2014-11-18 12:55:22 +0100 |
commit | b8fcaa7f4126ce2b5fe0436197b2aacc1be84e96 (patch) | |
tree | ef82829b07391f0193b63e2e2ae6b7f243a9cc6d /app/helpers/blob_helper.rb | |
parent | a4e98f0ec985c91631f41c56317926f29365d95a (diff) | |
download | gitlab-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.rb | 11 |
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 |