Project

General

Profile

Actions

Feature #5441

open

Some files not parsed as XML files

Added by Brahim Djoudi almost 7 years ago. Updated over 6 years 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.

Actions #1

Updated by Marcin Kuzminski [CTO] almost 7 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.

Actions #2

Updated by Brahim Djoudi almost 7 years ago

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

Actions #3

Updated by Marcin Kuzminski [CTO] over 6 years ago

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

Also available in: Atom PDF