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

Invalid regular expression #133

Open
fredcallaway opened this issue Sep 17, 2021 · 0 comments
Open

Invalid regular expression #133

fredcallaway opened this issue Sep 17, 2021 · 0 comments

Comments

@fredcallaway
Copy link

I get the following error when trying to use the CLI. Note that I've elided the full regex (which is very long)

$ write-good
/usr/local/lib/node_modules/write-good/node_modules/too-wordy/too-wordy.js:244
const wordyRegex = new RegExp(`\\b(?<!-)(${wordyWords.join('|')})\\b`, 'gi');

SyntaxError: Invalid regular expression: /\b(?<!-)(a[\b\s\u200C]*number[\b\s\u200C]*of|abunda [...] Invalid group
    at RegExp (<anonymous>)
    at Object.<anonymous> (/usr/local/lib/node_modules/write-good/node_modules/too-wordy/too-wordy.js:244:20)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/write-good/write-good.js:4:18)

node v8.2.1

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

1 participant