Skip to content

Quote commas for literal glob alternatives - #79

Open
rupayon123 wants to merge 1 commit into
gobwas:masterfrom
rupayon123:contribution/quote-comma-alternatives-20260923
Open

rupayon123 wants to merge 1 commit into
gobwas:masterfrom
rupayon123:contribution/quote-comma-alternatives-20260923

Conversation

@rupayon123

Copy link
Copy Markdown

Fixes #78.

QuoteMeta("a,b") currently returns a,b, so embedding it inside {...} silently creates two alternatives instead of one literal. Escape comma in QuoteMeta via the existing IsSpecial list. Escaped comma remains a literal outside groups as well.

The new regression failed on current master and checks matching both inside and outside an alternatives group. Local go test ./... -count=1, go test -race ./... -count=1, go vet ./..., and git diff --check pass. Remote CI remains to be checked. Prepared with AI assistance and reviewed and tested before submission.

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.

QuoteMeta output containing a comma splits into alternatives inside {…}

1 participant