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

Consider the case where multiple phrases appear in line #483

Merged
merged 1 commit into from
Mar 16, 2021

Conversation

fchiba
Copy link
Contributor

@fchiba fchiba commented Mar 15, 2021

This PR is intended to fix #480

error cause

If line is "if(_var && _var.foo) {" and regions is ["_var", "_var.foo", "{"],

After the first loop,

expected:
reminder should be " && _var.foo) {"

actual:
reminder is " && "

@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.176% when pulling 2a4903b on fchiba:fix-480 into 1abd2a3 on SlatherOrg:master.

@ksuther
Copy link
Contributor

ksuther commented Mar 15, 2021

@hborawski Would love your feedback on this since it was your PR. Thanks!

@hborawski
Copy link
Contributor

It looks good to me, I guess the split did not behave how I expected it to. Great find!

@ksuther ksuther merged commit 6fa3d4c into SlatherOrg:master Mar 16, 2021
@ksuther
Copy link
Contributor

ksuther commented Mar 16, 2021

Thanks for the PR!

@rogerluan
Copy link

Thanks for this fix! I was also facing this problem.

It'd be great to have this PR released in an official release 😊 but until then, if anyone's facing this problem as well, modify your Gemfile as such:

gem 'slather', github: 'SlatherOrg/slather', branch: 'master'

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.

Problem in new version 2.7.0
5 participants