Show More
@@ -65,7 +65,10 b' def pygmentize(self, tmpl, fctx, field):' | |||||
65 | lexer = guess_lexer_for_filename(fctx.path(), text, |
|
65 | lexer = guess_lexer_for_filename(fctx.path(), text, | |
66 | encoding=util._encoding) |
|
66 | encoding=util._encoding) | |
67 | except ClassNotFound: |
|
67 | except ClassNotFound: | |
68 | lexer = TextLexer(encoding=util._encoding) |
|
68 | try: | |
|
69 | lexer = guess_lexer(text, encoding=util._encoding) | |||
|
70 | except ClassNotFound: | |||
|
71 | lexer = TextLexer(encoding=util._encoding) | |||
69 |
|
72 | |||
70 | formatter = HtmlFormatter(style=style, encoding=util._encoding) |
|
73 | formatter = HtmlFormatter(style=style, encoding=util._encoding) | |
71 |
|
74 |
General Comments 0
You need to be logged in to leave comments.
Login now