##// END OF EJS Templates
highlight: make div trimmer work when lexer fails to identify text....
Brendan Cully -
r6197:f6565f7d default
parent child Browse files
Show More
@@ -72,7 +72,7 b' def pygmentize(self, tmpl, fctx, field):'
72 colorized = highlight(text, lexer, formatter)
72 colorized = highlight(text, lexer, formatter)
73 # strip wrapping div
73 # strip wrapping div
74 colorized = colorized[:colorized.find('\n</pre>')]
74 colorized = colorized[:colorized.find('\n</pre>')]
75 colorized = colorized[colorized.find('<span'):]
75 colorized = colorized[colorized.find('<pre>')+5:]
76 coloriter = iter(colorized.splitlines())
76 coloriter = iter(colorized.splitlines())
77
77
78 filters['colorize'] = lambda x: coloriter.next()
78 filters['colorize'] = lambda x: coloriter.next()
General Comments 0
You need to be logged in to leave comments. Login now