Skip to content

Preserve quoted trailing whitespace in config values#2145

Merged
jelmer merged 1 commit intojelmer:mainfrom
ctoth:config-trailing-whitespace-roundtrip
Apr 20, 2026
Merged

Preserve quoted trailing whitespace in config values#2145
jelmer merged 1 commit intojelmer:mainfrom
ctoth:config-trailing-whitespace-roundtrip

Conversation

@ctoth
Copy link
Copy Markdown
Contributor

@ctoth ctoth commented Apr 20, 2026

Follow-up to #2144.

The initial Hypothesis config round-trip property exposed a case where quoted trailing whitespace was not preserved when reading config values back.

For example, a value like b" " is written as a quoted config value, but parsing discarded the whitespace because _parse_string buffered whitespace even while inside quotes.

This changes _parse_string so spaces and tabs inside quotes are preserved immediately, while trailing whitespace outside quotes is still ignored.

Also included:

  • a focused regression test for round-tripping quoted trailing space and tab values
  • removal of the temporary property-test filter that excluded values ending in space or tab

@ctoth ctoth requested a review from jelmer as a code owner April 20, 2026 22:55
@jelmer
Copy link
Copy Markdown
Owner

jelmer commented Apr 20, 2026

Nice, thanks!

@jelmer jelmer enabled auto-merge April 20, 2026 23:13
@jelmer jelmer merged commit a5b16bb into jelmer:main Apr 20, 2026
33 checks passed
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.

2 participants