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

ecmascript: cannot include class \s in character range #54

Open
stevenh opened this issue Dec 6, 2022 · 0 comments · May be fixed by #55
Open

ecmascript: cannot include class \s in character range #54

stevenh opened this issue Dec 6, 2022 · 0 comments · May be fixed by #55

Comments

@stevenh
Copy link

stevenh commented Dec 6, 2022

When compiling using regexp2.ECMAScript the regexp [a-\s] fails with the following but it should pass:

error parsing regexp: cannot include class \115 in character range in `[a-\s]`

regexp101 shows how it should be interpreted.

stevenh added a commit to stevenh/regexp2 that referenced this issue Dec 6, 2022
Fix ECMAScript un-escaped literal '-' when followed predefined
character sets.

Fixes dlclark#54
stevenh added a commit to stevenh/regexp2 that referenced this issue Dec 6, 2022
Fix ECMAScript un-escaped literal '-' when followed predefined
character sets.

Also:
* Fixed missing error check on parseProperty() call.
* Use addChar(ch) helper instead of addRange(ch, ch).

Fixes dlclark#54
@stevenh stevenh linked a pull request Dec 6, 2022 that will close this issue
stevenh added a commit to stevenh/regexp2 that referenced this issue Dec 6, 2022
Fix ECMAScript un-escaped literal '-' when followed by predefined
character sets.

Also:
* Fixed missing error check on parseProperty() call.
* Use addChar(ch) helper instead of addRange(ch, ch).

Fixes dlclark#54
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 a pull request may close this issue.

1 participant