Skip to content

Fixed CRLF handling in AnsiDecoder.decode().#4143

Open
kmvanbrunt wants to merge 1 commit into
Textualize:masterfrom
kmvanbrunt:ansi_decode_fix
Open

Fixed CRLF handling in AnsiDecoder.decode().#4143
kmvanbrunt wants to merge 1 commit into
Textualize:masterfrom
kmvanbrunt:ansi_decode_fix

Conversation

@kmvanbrunt
Copy link
Copy Markdown

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

AI?

  • AI was used to generate this PR

AI did not generate the code, but I used Gemini CLI code-review extension to review my changes.

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate (see note about typos above).
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

Description

Fixes #4090

AnsiDecoder.decode() now rstrips both "\r" and "\n" characters to handle when Windows CRLF line breaks are present.

Important: Link to an issue or discussion regarding these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Text.from_ansi leaves empty lines when input string has CRLF line endings

1 participant