-
Notifications
You must be signed in to change notification settings - Fork 20
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
stringify adds leading newline #6
Comments
petemill
added a commit
to petemill/ssh-config
that referenced
this issue
Nov 15, 2015
If this fix could be merged and published to npm @dotnil , that would be great. Thanks |
@petemill I tried to reproduce the other issue you mentioned with the code below but with no luck. var obj = sshConfig.parse('')
obj.append({ Host: '*', IdentifyFile: '~/.ssh/all' })
console.log(sshConfig.parse(sshConfig.stringify(obj)))
// { '0': { Host: '*', IdentifyFile: '~/.ssh/all' } } Theoretically, an leading newline in the text being fed to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.parse
cannot parse the output of.stringify
as it outputs with a leading newline.Here is a reproducible case:
This produces an output with a leading newline. If we then try and parse that output with
.parse
, we get a corrupted object (which is probably another issue). If we remove the newline manually,.parse
works correctly.I'm thinking the issue is with
.stringify
The text was updated successfully, but these errors were encountered: