##// END OF EJS Templates
Merge with crew-stable.
Dirkjan Ochtman -
r6511:5c1bb575 merge default
parent child Browse files
Show More
@@ -51,10 +51,10 b' def pygmentize(field, fctx, style, tmpl)'
51 try:
51 try:
52 lexer = guess_lexer_for_filename(fctx.path(), text,
52 lexer = guess_lexer_for_filename(fctx.path(), text,
53 encoding=util._encoding)
53 encoding=util._encoding)
54 except ClassNotFound:
54 except (ClassNotFound, ValueError):
55 try:
55 try:
56 lexer = guess_lexer(text, encoding=util._encoding)
56 lexer = guess_lexer(text, encoding=util._encoding)
57 except ClassNotFound:
57 except (ClassNotFound, ValueError):
58 lexer = TextLexer(encoding=util._encoding)
58 lexer = TextLexer(encoding=util._encoding)
59
59
60 formatter = HtmlFormatter(style=style, encoding=util._encoding)
60 formatter = HtmlFormatter(style=style, encoding=util._encoding)
General Comments 0
You need to be logged in to leave comments. Login now