Fix additionally inserted whitespace in var(--foo,) and env(--foo,)#1142
Merged
devongovett merged 4 commits intoparcel-bundler:masterfrom Jan 28, 2026
Merged
Fix additionally inserted whitespace in var(--foo,) and env(--foo,)#1142devongovett merged 4 commits intoparcel-bundler:masterfrom
var(--foo,) and env(--foo,)#1142devongovett merged 4 commits intoparcel-bundler:masterfrom
Conversation
devongovett
approved these changes
Jan 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes an issue where
var(--foo,)with a fallback andenv(--foo,)with a fallback injected an extra whitespace character after the comma.This always happened even if there was already some whitespace. So an input like:
Resulted in:
It's using a similar fix as implemented here: 32f1f52#diff-2c849c2fb4295c48ca4d58d85ff61f2d31178ccd99b9190bd7714928a7d8d820

Instead of calling
.delim()we check for whitespace being present and manually inject the,and whitespace if necessary.Test plan
var()andenv()that ensures that no additional whitespace is added after the comma.Fixes: #1141