WebIDE doesn't highlight syntax of Perl modules correctly
We do use locally latest release of GitLab CE.
We have some projects written in Perl which consists of hundreds of Perl modules(with
While we do have more or less correct syntax highlight in single-page file preview,
on WebIDE we see just plain text.
API reports that
mime_type of file is
I did a little discovery and find out that you use two different editors:
The first one highlights the syntax correctly on basis of a file extension as it seems.
While the second one orients on
mime-types utilized in detection and first result is taken which gives us this result:
root@aac38ed14ab5:/tmp# ruby t.rb application/x-python application/x-pagemaker application/x-perl root@aac38ed14ab5:/tmp# cat t.rb require 'mime/types' puts MIME::Types.type_for('py') puts MIME::Types.type_for('pm')
GitLab CE uses only first value returned, which is
Obviously, unlikely we do use this ancient Adobe software.
It actually surprised me why this library thinks that
perl scripts are binary files.
Steps to reproduce
- Open any Perl module in
- See no syntax highlight whatsoever
What is the current bug behavior?
No syntax highlights for Perl modules in WebIDE.
What is the expected correct behavior?
Perl modules obtain syntax highlighting in WebIDE
Either extend parent module behavior or re-think the
text-only predicate for filtering mime-types.