DmitrySoshnikov / regexp-tree

Regular expressions processor in JavaScript
MIT License
400 stars 45 forks source link

Allow escaped hyphens in character classes #232

Closed just1ngray closed 3 years ago

just1ngray commented 3 years ago

Sorry for #231. I'm still getting a hang of publishing packages and open source in general.

This PR modifies the parsing grammar to allow escaped hyphens inside character classes. All tests pass and I've even added a new one.

For the time being, I can npm install https://github.com/just1ngray/regexp-tree and it's working for my purposes. Just thought I'd create a PR in case it'd help anyone else.

DmitrySoshnikov commented 3 years ago

Great, thanks for you contribution!