diff --git a/rich/ansi.py b/rich/ansi.py index 7bbcb0bfcc..50091dbec7 100644 --- a/rich/ansi.py +++ b/rich/ansi.py @@ -133,7 +133,7 @@ def decode(self, terminal_text: str) -> Iterable[Text]: Text: Marked up Text. """ for line in re.split(r"(?<=\n)", terminal_text): - yield self.decode_line(line.rstrip("\n")) + yield self.decode_line(line.rstrip("\n\r")) def decode_line(self, line: str) -> Text: """Decode a line containing ansi codes.