--- a/hgext/highlight/highlight.py Wed May 01 10:44:21 2013 -0700
+++ b/hgext/highlight/highlight.py Thu May 09 18:34:04 2013 -0500
@@ -38,12 +38,13 @@
# To get multi-line strings right, we can't format line-by-line
try:
- lexer = guess_lexer_for_filename(fctx.path(), text[:1024])
+ lexer = guess_lexer_for_filename(fctx.path(), text[:1024],
+ stripnl=False)
except (ClassNotFound, ValueError):
try:
- lexer = guess_lexer(text[:1024])
+ lexer = guess_lexer(text[:1024], stripnl=False)
except (ClassNotFound, ValueError):
- lexer = TextLexer()
+ lexer = TextLexer(stripnl=False)
formatter = HtmlFormatter(style=style)