Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clip unbalanced closing brackets in arbitrary values #9973

Merged
merged 2 commits into from Dec 1, 2022

Conversation

thecrypticace
Copy link
Contributor

Fixes #9911

@thecrypticace thecrypticace changed the title Properly clip candidates when there are too many ] characters Clip unbalanced closing brackets in arbitrary values Nov 30, 2022
@@ -184,7 +184,7 @@ function clipAtBalancedParens(input) {
// This means that there was an extra closing `]`
// We'll clip to just before it
if (depth < 0) {
return input.substring(0, match.index)
return input.substring(0, match.index - 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah, yep that will do it!

@thecrypticace thecrypticace merged commit e8b0365 into master Dec 1, 2022
@thecrypticace thecrypticace deleted the fix/clip-extra-brackets branch December 1, 2022 14:43
@developius
Copy link

Thank you @thecrypticace @RobinMalfait 🙏

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.

Arbitrary values aren't recognised in Ruby percent arrays
3 participants