##// END OF EJS Templates
diffs: switched lexer extraction to use single function in all places.
marcink -
r1358:f0122102 default
parent child Browse files
Show More
@@ -25,7 +25,7 b' from itertools import groupby'
25 from pygments import lex
25 from pygments import lex
26 from pygments.formatters.html import _get_ttype_class as pygment_token_class
26 from pygments.formatters.html import _get_ttype_class as pygment_token_class
27 from rhodecode.lib.helpers import (
27 from rhodecode.lib.helpers import (
28 get_lexer_for_filenode, get_lexer_safe, html_escape)
28 get_lexer_for_filenode, html_escape)
29 from rhodecode.lib.utils2 import AttributeDict
29 from rhodecode.lib.utils2 import AttributeDict
30 from rhodecode.lib.vcs.nodes import FileNode
30 from rhodecode.lib.vcs.nodes import FileNode
31 from rhodecode.lib.diff_match_patch import diff_match_patch
31 from rhodecode.lib.diff_match_patch import diff_match_patch
@@ -406,7 +406,7 b' class DiffSet(object):'
406 if filenode:
406 if filenode:
407 lexer = filenode.lexer
407 lexer = filenode.lexer
408 else:
408 else:
409 lexer = get_lexer_safe(filepath=filename)
409 lexer = FileNode.get_lexer(filename=filename)
410 self._lexer_cache[filename] = lexer
410 self._lexer_cache[filename] = lexer
411 return self._lexer_cache[filename]
411 return self._lexer_cache[filename]
412
412
General Comments 0
You need to be logged in to leave comments. Login now