Skip to content

Conversation

@RunDevelopment
Copy link

This fixes #23.

Changes:

  • countCapturingParens now counts the number of named and unnamed groups separately.
  • The _nFlag property is now set by consumePattern instead of validatePattern.
  • Patterns are now validated in a single pass (after the initial counting of all capturing groups).
  • Added two new test files to verify the fix. The regexes in these test files are the ones from test/fixtures/parser/literal/named-capturing-group-valid-2018.json. I simply copied the file and divided the patterns based on whether they are valid with strict: true.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants