-
Notifications
You must be signed in to change notification settings - Fork 156
Description
Description:
Syntect currently lacks support for highlighting Python console output (characterized by >>>
and ...
prompts) and doctests. This limitation hinders its ability to accurately represent Python code in various contexts, including code examples, tutorials, and interactive sessions.
Expected Behavior:
Syntect should correctly highlight the Python code while ignoring the >>>
, ...
, and output (stacktrace or stdout).
Steps to Reproduce:
-
Create a code snippet containing Python console output or a doctest:
>>> print("Hello, world!") Hello, world!
Note this language is commonly called pycon
(for python console), and tools like Pygments or Github markdown support this language (as evidenced by highlighting the above code).
(My desire is because I'm exploring Typst and want like to port my books from LaTeX to Typst. See this bug typst/typst#4661 )