Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

List item pruning while filtering is wrong #3206

Merged
merged 1 commit into from Dec 2, 2011

Conversation

luniki
Copy link

@luniki luniki commented Dec 2, 2011

The current pruning mechanism does not work as intended. The variable "change" replaces every instance

The regexp for example occasionally replaces every instance of lastval in the whole search string to determine the change.

I replaced this with a much simpler but correct solution w/o using regexp at all. Have fun!

jblas added a commit that referenced this pull request Dec 2, 2011
List item pruning while filtering is wrong
@jblas jblas merged commit b536eb5 into jquery-archive:master Dec 2, 2011
@jblas
Copy link
Contributor

jblas commented Dec 2, 2011

@luniki

Thanks for the patch. I ran across that logic a few months back and thought the logic looked a bit over-complicated and confusing. Your patch makes things much clearer.

Just an FYI, the String.replace() method will not do a global string replace unless you pass a RegExp object built with a 'g' option, or if a string is passed, as in this case, a 3rd arg "g" is passed to replace().

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants