2104: provide a way to map file extensions to syntax highlighting
- Fixed
- Review Board
devin.******@gmai***** (Google Code) (Is this you? Claim this profile.) | |
2288 |
Our product runs on Drupal, so PHP files end in .module/.inc/.install etc...and the diff highlighting in Reviewboard treats them as plaintext. We get around this in Doxygen highlighting by mapping file extensions to a parser - can this be done in ReviewBoard/Pygments?
I hacked rng support with this nasty patch on reviewboard/diffviewer/diffutils.py : 10a11 > from pygments.lexers import XmlLexer 501c502,505 < lexer = get_lexer_for_filename(filename, stripnl=False, --- > if filename.endswith(".rng"): > lexer = XmlLexer(stripnl=False, encoding='utf-8') > else: > lexer = get_lexer_for_filename(filename, stripnl=False, But for real usability, there need be storage for custom pairs - filepattern x lexer..