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

Fix strange bug with regexes #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix strange bug with regexes #25

wants to merge 1 commit into from

Conversation

gilbert
Copy link

@gilbert gilbert commented Feb 22, 2016

For some reason the regex isn't isn't updating x as it should.
I tried isolating, but no luck.
This fix is a bit more code, but it's good according to the spec,
so there should be no issues with backwards compatibility.

For some reason the regex isn't   isn't updating x as it should.
I tried isolating, but no luck.
This fix is a bit more code, but it's good according to the spec,
so there should be no issues with backwards compatibility.
@stevemao
Copy link
Collaborator

What exactly does it fix? Where is the updated test?

@gilbert
Copy link
Author

gilbert commented Feb 23, 2016

lastIndex updated as it should after one .exec() call, but afterwards reset to 0.

I will add a test when I get the chance. I just wanted to throw this up before I forgot about it.

@jaruba
Copy link

jaruba commented Apr 12, 2016

regular expressions don't work for me with or without this change..

I get:

Uncaught TypeError: Expected a string
at: node_modules\escape-string-regexp\index.js:7

this happens with the regex examples in README.md too.

@stevemao
Copy link
Collaborator

@jaruba This will be merged once a test has been added.

@stevemao
Copy link
Collaborator

@mindeavor can you add a test?

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.

3 participants