Skip to content

Preserve comment markers inside quoted values - #414

Open
rupayon123 wants to merge 1 commit into
go-ini:mainfrom
rupayon123:fix/quoted-inline-comments-20261002
Open

rupayon123 wants to merge 1 commit into
go-ini:mainfrom
rupayon123:fix/quoted-inline-comments-20261002

Conversation

@rupayon123

Copy link
Copy Markdown

Summary

Do not treat # or ; inside a surrounding single- or double-quoted value as an inline comment. A marker after the closing quote still starts the comment, and the parsed key retains the quoted value without its delimiters.

Fixes #393.

Validation

  • Added a regression covering single quotes, double quotes, and an inline comment after a closing quote. The test failed before the fix and passes after it.
  • go test ./... -count=1 passed.
  • go vet ./... and git diff --check passed.

This change was prepared with AI assistance at the account holder's direction; the account holder is responsible for this submission and will handle any required project-specific process.

This branch has not been deployed

No deployments
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

1 participant