(self, text)
| 521 | self.IPythonConsoleLexer = IPythonConsoleLexer(**options) |
| 522 | |
| 523 | def get_tokens_unprocessed(self, text): |
| 524 | # Search for the input prompt anywhere...this allows code blocks to |
| 525 | # begin with comments as well. |
| 526 | if re.match(r'.*(In \[[0-9]+\]:)', text.strip(), re.DOTALL): |
| 527 | lex = self.IPythonConsoleLexer |
| 528 | else: |
| 529 | lex = self.IPythonLexer |
| 530 | for token in lex.get_tokens_unprocessed(text): |
| 531 | yield token |
| 532 |