-
Notifications
You must be signed in to change notification settings - Fork 91
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
Unexpected behavior when using multiple conditions #33
Comments
Hi @BlackWiCKED, https://github.com/hbi99/defiant.js/blob/master/src/string.js I can fix this in a couple of hours... |
Actually, looks like it was easier to find than I thought. There is only one missing /g in the replace function to replace all occurrences of contains(). It works now. https://raw.githubusercontent.com/hbi99/defiant.js/master/dist/defiant-latest.js
|
Shall I send a proper pull request? I have not forked the original repository yet. |
I have spotted something strange when trying to connect multiple conditions with OR operator.
Demonstration of the issue:
XPATH EVALUATOR with default data:
//*[contains(title, "The") or contains(author, "Evelyn")]
Returns only 2 items - those which have the word "the" in their title.
//*[contains(title, "The") or contains(author, "velyn")]
Surprisingly it works when I delete the first character from the author condition.
All 3 items are returned in this case.
Must be some kind of problem with the regex replace. I will try to locate and fix it.
The text was updated successfully, but these errors were encountered: