You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rich syntax doesn't just apply highlighting to a stream of text. It changes tabs to spaces, wraps or truncates lines. It can add line numbers, indentation guides etc. i.e. it makes no guarantee that all it will do is add color.
Describe the bug
While running
rich.syntax
as a module a new line is added on each invocation.Provide a minimal code example that demonstrates the issue if you can. If the issue is visual in nature, consider posting a screenshot.
I use an alias of
alias hili='python -m rich.syntax -b default'
. It always adds a newline. Subsequent invocations of this do as well.When running through
xxd
you can see it adding newlines (0x0A
) characters.Ideally when running through a pipe nothing should be modified.
Platform
Click to expand
Linux VM (via WSL2)
The text was updated successfully, but these errors were encountered: