revert using the extension of the blob to determine the syntax highlighting language

nohighlight functionality for a hardcoded set of filenames is kept
This commit is contained in:
Zertrin 2014-10-21 09:59:03 +02:00 committed by Marc Gallet
parent a4e98f0ec9
commit b8fcaa7f41

View file

@ -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