-
Notifications
You must be signed in to change notification settings - Fork 45
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
certain meta characters shouldn't be allowed in char ranges #219
Comments
andruo11
changed the title
meta characters shouldn't be allowed in char ranges
certain meta characters shouldn't be allowed in char ranges
Jan 22, 2021
...and ditto for Unicode properties like |
Thanks for the report, yeah, the |
Is your reference another parser in the AST explorer, or JS itself? and if JS, how do you know the internal structure? My parents think I should learn more about this topic, and if I’m going to help out, I should probably figure out how to make a good pull request.
From: Dmitry Soshnikov <[email protected]>
Sent: Monday, January 25, 2021 3:00 PM
To: DmitrySoshnikov/regexp-tree <[email protected]>
Cc: Andrew Levine <[email protected]>; Author <[email protected]>
Subject: Re: [DmitrySoshnikov/regexp-tree] certain meta characters shouldn't be allowed in char ranges (#219)
Thanks for the report, yeah, the /[\w-z]/.test('-') should actually be parsed as a char class containing \w, - and z.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#219 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABGBMZIFFFRT3FO2OILXM2TS3XZVTANCNFSM4WPBGL7A> . <https://github.com/notifications/beacon/ABGBMZODFVHQIWVZUZKIHI3S3XZVTA5CNFSM4WPBGL7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFW5AXOI.gif>
|
Seems |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I parse the regex
/[\w-z]/
it should throw an error, but instead parses as a regular character range with \w at the beginning. https://astexplorer.net/#/gist/124dd2c7d464e3cf68b532bf8dacae7f/01a86f60e792112367c9395cf1094b5806dcaab1 If I figure out how to fix it I'll let you know!The text was updated successfully, but these errors were encountered: