BigW Consortium Gitlab
Reactivate highlight.js language autodetection ### What does this MR do? This commit partly reverts commit 0d13abb1 to reactivate highlight.js language autodetection. It does NOT revert the part that adds the `nohighlight` CSS-class for a predefined set of filenames (which was indeed the intended purpose of commit 0d13abb1). ### Are there points in the code the reviewer needs to double check? Not particularly, the only effect of this blob_helper is to add a CSS class to the `<pre>` container of the blob, to control the way highlight.js performs its syntax highlighting. (see where this helper is called at https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/views/shared/_file_hljs.html.haml#L12). However this merge request DOES change the way the syntax highlighting is done (by bringing it back to the situation before commit 0d13abb1 where highlight.js autodetected the language itself). So we can expect some new kind of syntax highlighting problems. However in this case, the issues should be forwarded to the upstream project (https://github.com/isagalaev/highlight.js). ### Why was this MR needed? The main motivation behind this partial revert is that there is no point (IMHO) in using an "intelligent" syntax highlighter which is specifically designed to autodetect languages if it is to dictate (via the CSS class) the language to use solely based on the filename extension. ### What are the relevant issue numbers / Feature requests? Issue #665 "HLJS language autodetection / syntax highlighting fails " ### Screenshots (If appropriate) See screenshots in issue #665 See merge request !232
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
appearances_helper.rb | Loading commit data... | |
application_helper.rb | Loading commit data... | |
blob_helper.rb | Loading commit data... | |
branches_helper.rb | Loading commit data... | |
broadcast_messages_helper.rb | Loading commit data... | |
commits_helper.rb | Loading commit data... | |
compare_helper.rb | Loading commit data... | |
dashboard_helper.rb | Loading commit data... | |
diff_helper.rb | Loading commit data... | |
emails_helper.rb | Loading commit data... | |
events_helper.rb | Loading commit data... | |
git_helper.rb | Loading commit data... | |
gitlab_markdown_helper.rb | Loading commit data... | |
graph_helper.rb | Loading commit data... | |
groups_helper.rb | Loading commit data... | |
icons_helper.rb | Loading commit data... | |
issues_helper.rb | Loading commit data... | |
labels_helper.rb | Loading commit data... | |
merge_requests_helper.rb | Loading commit data... | |
namespaces_helper.rb | Loading commit data... | |
notes_helper.rb | Loading commit data... | |
notifications_helper.rb | Loading commit data... | |
oauth_helper.rb | Loading commit data... | |
profile_helper.rb | Loading commit data... | |
projects_helper.rb | Loading commit data... | |
search_helper.rb | Loading commit data... | |
selects_helper.rb | Loading commit data... | |
snippets_helper.rb | Loading commit data... | |
submodule_helper.rb | Loading commit data... | |
tab_helper.rb | Loading commit data... | |
tags_helper.rb | Loading commit data... | |
tree_helper.rb | Loading commit data... | |
visibility_level_helper.rb | Loading commit data... |