8000 Preserve comment markers inside quoted values by rupayon123 · Pull Request #414 · go-ini/ini · GitHub
[go: up one dir, main page]

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
@rupayon123 rupayon123 commented Oct 3, 2026 •
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 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

0