Here's a contrived example that demonstrates the issue:
from rich.console import Console
from rich.panel import Panel
console = Console()
text = 'A quick brown\N{NO-BREAK SPACE}fox jumps over the lazy dog.'
console.print(Panel(text, width=20))
It prints
╭──────────────────╮
│ A quick brown │
│ fox jumps over │
│ the lazy dog. │
╰──────────────────╯
Observe how there's a line break between 'brown' and 'fox', despite the U+0020 NO-BREAK SPACE character. Apparently rich treats it like any other whitespace.
This is what I wanted to see:
╭──────────────────╮
│ A quick │
│ brown fox jumps │
│ over the lazy │
│ dog. │
╰──────────────────╯
Describe the bug
Here's a contrived example that demonstrates the issue:
It prints
Observe how there's a line break between 'brown' and 'fox', despite the U+0020 NO-BREAK SPACE character. Apparently rich treats it like any other whitespace.
This is what I wanted to see:
Platform
Click to expand
> What platform (Win/Linux/Mac) are you running on? Ubuntu 24.10 > What terminal software are you using? GNOME Terminal 3.54.0 using VTE 0.78.0 +BIDI +GNUTLS +ICU +SYSTEMD ```console $ python -m rich.diagnose ╭─────────────────────────