Give a hint to highlightjs based on file extension
Created by: clementbethuys
I have bad syntax highlighting for my javascript files in Gitlab (6.7.2) . It seems highlight.js wrongly pick other languages instead of javascript.
It will be great to check for the file extension and give highlight.js a hint on the language.
For exemple: if the file-ext is '.js' force javascript
In the gitlab application_helper.rb we see it doesn't give any hint
content_tag :pre do
content_tag :code do
My workaround, was to recompile assets with another highligh.js file where i removed unwanted languages so highligh.js can't pick them. (can be easily done here http://highlightjs.org/download/)
Hope this issue will helps others, And btw thx for this great project !