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

it should ignore whitespace when parsing ini #5

Open
sarim opened this issue Mar 25, 2023 · 2 comments
Open

it should ignore whitespace when parsing ini #5

sarim opened this issue Mar 25, 2023 · 2 comments

Comments

@sarim
Copy link

sarim commented Mar 25, 2023

foo = bar

Outputs the json

"foo ": " bar"

It should trim whitespace around = when parsing.

@sarim
Copy link
Author

sarim commented Mar 25, 2023

data, _ := regexp.Compile("(.+)=(.+)")

Adding optional \s around = should fix it.

@alabuel
Copy link
Owner

alabuel commented Jun 28, 2023

fix will be included in the next release. I have used strings.Trimspace instead to remove leading and trailing whitespace

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

2 participants