Skip to content

browse/utils: Ensure to guess language from filename and not its path

A filename must be provided as parameter to the get_hljs_language_from_filename function and not a path.

This fixes some code highlighting issue when a filename who has a language associated is not in the root directory of the browsed filesystem.

See for instance that CMakeLists.txt file that should have been highlighted as cmake.


Migrated from D6904 (view on Phabricator)

Merge request reports