Skip to content

Represent ESC character in inline snapshots. - #231

Open
zainab-ali wants to merge 1 commit into
siriusxm:mainfrom
zainab-ali:non-readable-ascii
Open

Represent ESC character in inline snapshots.#231
zainab-ali wants to merge 1 commit into
siriusxm:mainfrom
zainab-ali:non-readable-ascii

Conversation

@zainab-ali

Copy link
Copy Markdown
Contributor

Resolves #204

case '\n' => "\\n"
case '\r' => "\\r"
case '\t' => "\\t"
case '\u001B' => ""

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now treated as non-readable ASCII below. There are no issues writing to patch files or updating snapshots.

I suspect the case '\u001B' => "" logic was from pprint, which was designed for terminal output.

@zainab-ali
zainab-ali marked this pull request as ready for review July 13, 2026 13:16
@zainab-ali
zainab-ali force-pushed the non-readable-ascii branch from 6138814 to 49add1b Compare July 13, 2026 14:54
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.

InlineRepr.printChar maps ESC (0x1B) to an empty string, silently dropping ANSI escapes from snapshot reprs

2 participants