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

Comments started with '#' are always skipping #4

Open
oneumyvakin opened this issue Mar 24, 2019 · 1 comment
Open

Comments started with '#' are always skipping #4

oneumyvakin opened this issue Mar 24, 2019 · 1 comment

Comments

@oneumyvakin
Copy link

Hello, first of all thank you for this package, it's great that it so powerful and tiny!

I just want to share that comments lines started with '#' are skipped always beside of ini.skipCommits.
It looks like because second condition in following if:

if ini.skipCommits && line[0] == ';' || line[0] == '#' {
            // Skip comments
            continue
}
@flevanti
Copy link

it looks like a simple precedence issue, a small logical bug...
This to try: https://go.dev/play/p/8KbNXIQci4L
prints
true1 true2 true3

so pushing a small change if ini.skipCommits && (line[0] == ';' || line[0] == '#') { should fix it 🙂

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