Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where internal unquoted whitespace truncates values #205

Merged
merged 10 commits into from Feb 5, 2023

Conversation

joho
Copy link
Owner

@joho joho commented Feb 5, 2023

Reported in #204

The new parser for multiline values incorrectly truncates unquoted lines with internal whitespace.

There was no test for this previously so was "undefined" behaviour, but given we use https://github.com/bkeepers/dotenv as our "standard", it works there so it should work here.

Once getting deeper into the fix, I discovered not all tests had been moved over to the new parser and some dead code had been left in the package. I've now fixed all that up and got (almost all) original tests passing.

I cut two tests (allowing unterminated quoted variables) as they didn't match any rspec in ruby's dotenv.

@joho joho marked this pull request as ready for review February 5, 2023 11:06
@joho joho force-pushed the fix-1.5-unquoted-internal-whitespace-regression branch from 98e2598 to 27959f3 Compare February 5, 2023 11:08
@joho joho merged commit 3fc4292 into main Feb 5, 2023
@joho joho deleted the fix-1.5-unquoted-internal-whitespace-regression branch February 5, 2023 21:47
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.

None yet

1 participant