The library's matchAll() method would enter an infinite loop when used with a regular expression that matches empty strings, such as /(?:)/g. This commit fixes the issue by manually incrementing the lastIndex property when an empty match is found.
Additionally, a new test case has been added to the test suite to verify that matchAll() works correctly with empty matches.
The library's matchAll() method would enter an infinite loop when used with a regular expression that matches empty strings, such as /(?:)/g. This commit fixes the issue by manually incrementing the lastIndex property when an empty match is found.
Additionally, a new test case has been added to the test suite to verify that matchAll() works correctly with empty matches.