-
-
Notifications
You must be signed in to change notification settings - Fork 859
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert to old whitespace-trimming behaviour.
Old behaviour is that whitespace gets trimmed, whether quoted or unquoted.
- Loading branch information
1 parent
c830089
commit fcb175b
Showing
4 changed files
with
2 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,10 +19,7 @@ RETAIN_INNER_QUOTES={"foo": "bar"} | |
RETAIN_INNER_QUOTES_AS_STRING='{"foo": "bar"}' | ||
INCLUDE_SPACE=some spaced out string | ||
WHITESPACE_TRIM= trim me | ||
QUOTED_WHITESPACE_NOTRIM_1=' dont trim me ' | ||
QUOTED_WHITESPACE_NOTRIM_2=" dont trim me " | ||
USERNAME="[email protected]" | ||
|
||
PARSER_QA_1= 'a'b'c'd'e' # a comment | ||
PARSER_QA_2=" mismatched\nquotes ' # should\nnot\nprocess | ||
PARSER_QA_3=" # yes\n # yes\n" # no |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,12 +183,6 @@ describe('dotenv', function () { | |
done() | ||
}) | ||
|
||
it('retains quoted leading/trailing whitespace', function (done) { | ||
parsed.QUOTED_WHITESPACE_NOTRIM_1.should.eql(' dont trim me ') | ||
parsed.QUOTED_WHITESPACE_NOTRIM_2.should.eql(' dont trim me ') | ||
done() | ||
}) | ||
|
||
it('parses email addresses completely', function (done) { | ||
parsed.should.have.property('USERNAME', '[email protected]') | ||
done() | ||
|
@@ -197,7 +191,6 @@ describe('dotenv', function () { | |
it('handles severe combinations of the above', function (done) { | ||
parsed.PARSER_QA_1.should.eql("a'b'c'd'e") | ||
parsed.PARSER_QA_2.should.eql('" mismatched\\nquotes \'') | ||
parsed.PARSER_QA_3.should.eql(' # yes\n # yes\n') | ||
done() | ||
}) | ||
}) | ||
|