-
Notifications
You must be signed in to change notification settings - Fork 60
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
Environment Variable Separation logic #14
Conversation
Signed-off-by: Shubham Sharma <shubhamsharma1172@gmail.com>
I will be willing to add test cases for the same. I wonder if this can be a good point to set up tests for this repository - provided you have that bandwidth. |
Hey Shubham, am I missing something, or we want to look at this again. do you have any working example with new code for this? |
Signed-off-by: Shubham Sharma <shubhamsharma1172@gmail.com>
Oops @ashishonce, I missed that. Updating the splitting on '=' logic to consider quotes around values. I have written some tests here, please feel free to checkout https://jsfiddle.net/06yn3zw9/3/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
we should also think about adding unit test for this .
@narula0781 can we add this to backlog?
@ashishonce, I would be happy to volunteer for writing unit tests for this. |
thanks @shubham1172 . let's merge this PR and then you can add a test if required. |
This PR is based on #10
Splitting '='
Fix by @yuhattor - only split the first instance of '=' instead of all.
Edit: Added another logic to parse values with optional quotes around them.
Original
Modified
Original
Modified
Splitting whitespace
New fix - do not account for whitespaces that are inside quotes while splitting.
Original
Modified