Skip to content

Commit

Permalink
Improve docstring wording
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns committed Nov 7, 2023
1 parent 55972a9 commit f82b464
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rich/_wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@


def words(text: str) -> Iterable[tuple[int, int, str]]:
"""Yields each word from the text as a tuple containing (start_index, end_index, word)."""
"""Yields each word from the text as a tuple
containing (start_index, end_index, word). A "word" in this context may
include the actual word and any whitespace to the right.
"""
position = 0
word_match = re_word.match(text, position)
while word_match is not None:
Expand Down

0 comments on commit f82b464

Please sign in to comment.