From b8fcaa7f4126ce2b5fe0436197b2aacc1be84e96 Mon Sep 17 00:00:00 2001 From: Zertrin Date: Tue, 21 Oct 2014 09:59:03 +0200 Subject: [PATCH] revert using the extension of the blob to determine the syntax highlighting language nohighlight functionality for a hardcoded set of filenames is kept --- app/helpers/blob_helper.rb | 11 +++-------- 1 file 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