Skip to content

Commit

Permalink
Do not wrap text at no-break spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Nov 22, 2024
1 parent 43d3b04 commit 1ac9270
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rich/_wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ._loop import loop_last
from .cells import cell_len, chop_cells

re_word = re.compile(r"\s*\S+\s*")
re_word = re.compile("\\s*[\\S\N{NO-BREAK SPACE}]+\\s*")


def words(text: str) -> Iterable[tuple[int, int, str]]:
Expand Down

0 comments on commit 1ac9270

Please sign in to comment.