Skip to content

Fix range parsing with dotted lookup keys - #2138

Open
efegokdemir wants to merge 2 commits into
Shopify:mainfrom
efegokdemir:efe/liquid-range-dot-keys
Open

efegokdemir wants to merge 2 commits into
Shopify:mainfrom
efegokdemir:efe/liquid-range-dot-keys

Conversation

@efegokdemir

Copy link
Copy Markdown

Range parsing can mistake .. inside a quoted lookup key for its separator, producing incorrect loop values for endpoints such as paths[".."] and paths["..."]. This keeps the existing fast path for ordinary ranges and scans for the separator outside quoted and bracketed lookups when the regex match is incomplete. Regression coverage exercises dotted lower and upper bounds.

The default bundle exec rake tasks passed on Ruby 4.0.7 using a task-local Gemfile that omits the spec-only Git dependency. RuboCop inspected 160 files with no offenses. Related to #1890.

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.

1 participant