Show More
@@ -491,7 +491,9 b' class IPyLexer(Lexer):' | |||||
491 | self.IPythonConsoleLexer = IPythonConsoleLexer(**options) |
|
491 | self.IPythonConsoleLexer = IPythonConsoleLexer(**options) | |
492 |
|
492 | |||
493 | def get_tokens_unprocessed(self, text): |
|
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 | lex = self.IPythonConsoleLexer |
|
497 | lex = self.IPythonConsoleLexer | |
496 | else: |
|
498 | else: | |
497 | lex = self.IPythonLexer |
|
499 | lex = self.IPythonLexer |
General Comments 0
You need to be logged in to leave comments.
Login now