(self, document)
| 179 | } |
| 180 | |
| 181 | def lex_document(self, document): |
| 182 | text = document.text.lstrip() |
| 183 | |
| 184 | lexer = self.python_lexer |
| 185 | |
| 186 | if text.startswith('!') or text.startswith('%%bash'): |
| 187 | lexer = self.shell_lexer |
| 188 | |
| 189 | elif text.startswith('%%'): |
| 190 | for magic, l in self.magic_lexers.items(): |
| 191 | if text.startswith('%%' + magic): |
| 192 | lexer = l |
| 193 | break |
| 194 | |
| 195 | return lexer.lex_document(document) |
nothing calls this directly
no outgoing calls
no test coverage detected