Project

General

Profile

Feature #5441

Some files not parsed as XML files

Added by Brahim Djoudi almost 2 years ago. Updated over 1 year ago.

Status:
New
Priority:
Low
Category:
Feature Idea
Target version:
Start date:
25.02.2018
Due date:
% Done:

0%

Estimated time:
2.30 h
Sorting:
Commit Number:

Description

Some files have filenames or extensions that don't indicate explicitely their types.
For instance, Eclipse project files .project and .classpath are XML files.
They should parsed as XML files from the header:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>

Product used: rhodecode-enterprise-ce-4.11.5

Regards.

History

#1 Updated by Marcin Kuzminski [staff] almost 2 years ago

Hi,

We use pygments to detect mimetypes and lexers for rendering.

You can override the rendering by enabling rcextensions and changing the EXTRA_LEXERS inside:

For example a definition in rcextensions,

EXTRA_LEXERS = {
'project': 'xml',
'classpath': 'xml',
}

List of all options is here: http://pygments.org/docs/lexers/ you have to use the 'ext': 'short_name' format.

#2 Updated by Brahim Djoudi almost 2 years ago

OK. I will complete with some extensions.
Thank you!

#3 Updated by Marcin Kuzminski [staff] over 1 year ago

  • Target version changed from v5.0 to v4.14

Also available in: Atom PDF