Skip to content

fix(parser): preserve comment symbols inside quoted string values - #416

Closed
AdamMagued wants to merge 1 commit into
go-ini:v1from
AdamMagued:fix-issue-393
Closed

AdamMagued wants to merge 1 commit into
go-ini:v1from
AdamMagued:fix-issue-393

Conversation

@AdamMagued

Copy link
Copy Markdown

Fixes #393

Summary

  • Updated parser to ignore inline comment delimiters when located inside quoted string literals.
  • Added unit tests covering values containing # and ; within single and double quotes.

Verified via container sandbox test suite.

Signed-off-by: AdamMagued <adamismailmageud@gmail.com>

unknwon commented Nov 11, 2026

Copy link
Copy Markdown
Member

Thanks! PR 414 is merged for issues 393 and 328. This one also treats \ as an escape outside quotes, which changes how values like foo\#bar parse by default, and it fails gofmt.

@unknwon unknwon closed this Nov 11, 2026
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.

value parsed incorrectly when a comment symbol (#) is inside a quoted string

2 participants