Hi, thanks for your work!
I encountered the following issue when using this lexer to highlight the contents of a jupyter notebook cell.
This should time the runtime of run_command, but instead it fails on ! because the lexer assumes that whatever comes after %%time should be handled by the normal python lexer.
Reproducing snippet:
from pygments import highlight
from pygments.formatters import TerminalFormatter
from pygments.lexers import get_lexer_by_name
lexer = get_lexer_by_name("ipython3")
code = "%%time\n!cmd"
print(highlight(code, lexer, TerminalFormatter()))
Hi, thanks for your work!
I encountered the following issue when using this lexer to highlight the contents of a jupyter notebook cell.
This should time the runtime of
run_command, but instead it fails on!because the lexer assumes that whatever comes after%%timeshould be handled by the normal python lexer.Reproducing snippet: