##// END OF EJS Templates
merge with stable
Matt Mackall -
r19179:12459bfa merge default
parent child Browse files
Show More
@@ -38,12 +38,13 b' def pygmentize(field, fctx, style, tmpl)'
38 38
39 39 # To get multi-line strings right, we can't format line-by-line
40 40 try:
41 lexer = guess_lexer_for_filename(fctx.path(), text[:1024])
41 lexer = guess_lexer_for_filename(fctx.path(), text[:1024],
42 stripnl=False)
42 43 except (ClassNotFound, ValueError):
43 44 try:
44 lexer = guess_lexer(text[:1024])
45 lexer = guess_lexer(text[:1024], stripnl=False)
45 46 except (ClassNotFound, ValueError):
46 lexer = TextLexer()
47 lexer = TextLexer(stripnl=False)
47 48
48 49 formatter = HtmlFormatter(style=style)
49 50
General Comments 0
You need to be logged in to leave comments. Login now