Show More
@@ -25,7 +25,7 b' from itertools import groupby' | |||
|
25 | 25 | from pygments import lex |
|
26 | 26 | from pygments.formatters.html import _get_ttype_class as pygment_token_class |
|
27 | 27 | from rhodecode.lib.helpers import ( |
|
28 | get_lexer_for_filenode, html_escape) | |
|
28 | get_lexer_for_filenode, html_escape, get_custom_lexer) | |
|
29 | 29 | from rhodecode.lib.utils2 import AttributeDict |
|
30 | 30 | from rhodecode.lib.vcs.nodes import FileNode |
|
31 | 31 | from rhodecode.lib.diff_match_patch import diff_match_patch |
@@ -407,8 +407,12 b' class DiffSet(object):' | |||
|
407 | 407 | if filename not in self._lexer_cache: |
|
408 | 408 | if filenode: |
|
409 | 409 | lexer = filenode.lexer |
|
410 | extension = filenode.extension | |
|
410 | 411 | else: |
|
411 | 412 | lexer = FileNode.get_lexer(filename=filename) |
|
413 | extension = filename.split('.')[-1] | |
|
414 | ||
|
415 | lexer = get_custom_lexer(extension) or lexer | |
|
412 | 416 | self._lexer_cache[filename] = lexer |
|
413 | 417 | return self._lexer_cache[filename] |
|
414 | 418 |
General Comments 0
You need to be logged in to leave comments.
Login now