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

Replace RegEx with version compliant with broader RegEx parsers #47

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

Conversation

dwayne-mss
Copy link

The RegEx expression [_-\\s]+ is invalid in many RegEx parsers... and scripts created by Elm will fail when this JS method is run within those environments.

This PR replaces the above expression with [_\\s-]+ which I believe has the same effect, but does not result in the invalid character range error.

I would also like to back port this to version 1.5.0 if approved.

ahankinson added a commit to ahankinson/core-extra that referenced this pull request Sep 4, 2023
An unescaped dash can be misinterpreted in JavaScript, so it is escaped.

This is a follow-on from elm-community/string-extra#47, but the method of fixing it is to explicitly escape the dash, rather than moving its position.
gampleman pushed a commit to elmcraft/core-extra that referenced this pull request Sep 4, 2023
An unescaped dash can be misinterpreted in JavaScript, so it is escaped.

This is a follow-on from elm-community/string-extra#47, but the method of fixing it is to explicitly escape the dash, rather than moving its position.
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.

2 participants