##// END OF EJS Templates
Improve detection of IPython console sessions.
chebee7i -
Show More
@@ -491,7 +491,9 b' class IPyLexer(Lexer):'
491 491 self.IPythonConsoleLexer = IPythonConsoleLexer(**options)
492 492
493 493 def get_tokens_unprocessed(self, text):
494 if re.match(r'(In \[[0-9]+\]:)', text.strip()):
494 # Search for the input prompt anywhere...this allows code blocks to
495 # begin with comments as well.
496 if re.match(r'.*(In \[[0-9]+\]:)', text.strip(), re.DOTALL):
495 497 lex = self.IPythonConsoleLexer
496 498 else:
497 499 lex = self.IPythonLexer
General Comments 0
You need to be logged in to leave comments. Login now