Skip to content

Regex bug #4

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

Open
NicotineLL opened this issue Dec 13, 2015 · 3 comments
Open

Regex bug #4

NicotineLL opened this issue Dec 13, 2015 · 3 comments

Comments

@NicotineLL
Copy link

I've tried using the script on Codepen and it worked, but when installing it locally the console returned an error.

Uncaught SyntaxError: missing ) after argument list" on line 208

Now the line with the problem is actually the previous one

_tpl = _tpl.replace(/{{i}}/g, this.elementCount);

The browser reads it like

_tpl = _tpl.replace(//g, this.elementCount);

because it's not escaped. It should be

_tpl = _tpl.replace(/\{\{i\}\}/g, this.elementCount);

@tomhallam
Copy link
Owner

Thanks for the heads up! Fancy submitting a pull request?

@NicotineLL
Copy link
Author

I'm not really that into Github and I don't know how things work around here. Just wanted to report the bug :)

@tomhallam
Copy link
Owner

Sure, I'll look at pushing up a fix when I get some time.

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

No branches or pull requests

2 participants