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

Quotes are not stripped from escaped property values when inline comments are present #89

Open
lpd-au opened this issue May 23, 2019 · 0 comments

Comments

@lpd-au
Copy link

lpd-au commented May 23, 2019

Ini property values may be quoted to escape special characters and indicate they are strings. However, comments following a quoted property value force the quotes to appear literally in the output.

Test Case

const ini = require('ini');

console.log(ini.decode('a.b = "c"'));
console.log(ini.decode('a.b = "c" ; asdf'));
console.log(ini.decode('a.b = c ; asdf'));

Expected Output

{ 'a.b': 'c' }
{ 'a.b': 'c' }
{ 'a.b': 'c' }
=> undefined

Actual Output

{ 'a.b': 'c' }
{ 'a.b': '"c"' }
{ 'a.b': 'c' }
=> undefined

This issue relates to: #81.

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

No branches or pull requests

1 participant