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

fix: if a line contains multiple # characters, there will be issues w… #238

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

astak16
Copy link
Contributor

@astak16 astak16 commented Dec 15, 2024

When traversing from back to front, an error occurs if a line contains multiple # characters, such as bar=foo # baz # other. I changed it to traverse from front to back instead.

Copy link

@ccoVeille ccoVeille left a comment

Choose a reason for hiding this comment

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

I was a bit afraid this PR could lead to breaking changes.

But as you said code currently return an error.

So I hope, there is code out there relying on the behavior that an error was returned.

So my confidence level with this PR is about 80 % it would be OK

parser.go Outdated Show resolved Hide resolved
@astak16
Copy link
Contributor Author

astak16 commented Dec 15, 2024

I was a bit afraid this PR could lead to breaking changes.

But as you said code currently return an error.

So I hope, there is code out there relying on the behavior that an error was returned.

So my confidence level with this PR is about 80 % it would be OK

This error occurred because the test cases did not include this example.

Then I added this situation to the test cases.

It would parse bar=foo # baz # other as bar: "foo # baz"

I thought this was problematic, so I submitted a pull request.

@joho joho merged commit 3a7a190 into joho:main Dec 16, 2024
2 checks passed
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.

3 participants