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

feat: allow exact values #4

Merged
merged 4 commits into from
Nov 27, 2024
Merged

feat: allow exact values #4

merged 4 commits into from
Nov 27, 2024

Conversation

mja00
Copy link
Collaborator

@mja00 mja00 commented Nov 26, 2024

This just disables the inline comment escaping

This just disables the inline comment escaping
@mja00 mja00 requested a review from Cherry November 26, 2024 20:05
Copy link
Member

@Cherry Cherry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks! Can we update the README with some basic details about this new exactValue option please?

@Cherry
Copy link
Member

Cherry commented Nov 26, 2024

I also wonder if it might be better to simply only look at ; comments if they have some whitespace before them.

So:

foo=bar;baz;bap ; comment

would parse as bar;baz;bap. That does seem to be a pretty common approach from the quick searching I've done.

@mja00
Copy link
Collaborator Author

mja00 commented Nov 27, 2024

I also wonder if it might be better to simply only look at ; comments if they have some whitespace before them.

Would we want to check for spaces all around the character or just after it?

IE: blah; this would trigger a comment
or
blah ; this would trigger a comment

where we'd stop parsing on the space so it'd just come out as blah.

@Cherry
Copy link
Member

Cherry commented Nov 27, 2024

There seems to be some consensus (as much as you get can get for ini) that any whitespace before a ; then indicates a comment? What do you think?

@mja00
Copy link
Collaborator Author

mja00 commented Nov 27, 2024

There seems to be some consensus (as much as you get can get for ini) that any whitespace before a ; then indicates a comment? What do you think?

Yeah makes sense to me. It's easy enough in the parser to check for whitespace around the comment character.

@mja00 mja00 requested a review from Cherry November 27, 2024 15:41
@Cherry Cherry merged commit 10d5762 into master Nov 27, 2024
0 of 6 checks passed
@Cherry Cherry deleted the feat/exact-value branch November 27, 2024 17:51
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

Successfully merging this pull request may close these issues.

2 participants