-
Notifications
You must be signed in to change notification settings - Fork 407
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
Bugs in parser around unquoted whitespace and newlines in v1.5.0 #204
Comments
It's definitely unintended, in that it wasn't an explicit decision, though I'd say it was "undefined" behaviour. I'll go check what ruby/node do, and we'll do the same as them. |
Yep, so I've gone and tested against ruby. This is a regression, will fix and get a 1.5.1 out |
Yeah I did a pretty ordinary job code reviewing the multiline PR and it's pulled a few regressions in, some in previously "undefined" behaviour, and some in tests that weren't updated to exercise the newer code paths. Fix might be this week, might drag out a bit, got a hectic schedule at the moment. |
I'm wondering if my issue is the same, because I'm using
using
|
Yeah, I suspect it's the exact same issue. I'll put in a test case on my branch that covers that in yaml style explicitly. |
Yep, definitely is, here's some test output from my new cases
|
I think it's this line: Lines 115 to 123 in b311b26
Not sure what will happen if we just remove that check, is there a usecase where unquoted value can't have space ? I think for both .yaml and .env format we only need to quote for "newline(\n)" and not " "?
|
OK I think I've cracked the nut of it. For that specific bug I had to change the rules to
I also found and fixed some bugs in the key finding/naming and sorted those at the same time. Will merge tomorrow and re-release. |
Thanks for the quick response and action! |
* Add tests to cover the regression reported in #204 * Add a comment on regex for clarity * Remove some old code that wasn't doing anything * Push _all_ parse code into the parser and get tests calling live code * Add some newline specific tests * Add some YAML tests for the newline/space split bug * Fix incorrect terminating of lines on whitespace * Fix most of the parser regressions * Bring back FOO.BAR names * remove some commented out code
Hi there!
I'd just like to let you know that the following, which worked on v1.4.0, now breaks in v1.5.0:
It's possible to fix by wrapping into quotes, though:
As there isn't any official dotenv specification (AFAIK), I'm not sure if the former is supposed to work in the first place, but it caught my attention and I decided to wait until at least we have a decision if this is going to be addressed or not before upgrading, because it can end up breaking for my users.
The text was updated successfully, but these errors were encountered: