Skip to content

Fix critical bug when repeated characters are not normalized

Compare
Choose a tag to compare
@motss motss released this 13 Jul 17:30

Changes

  • πŸ› Now each character in an input string receives its own copy of RegExp instance for normalization, due to a bug reported in #112 which was caused by reusing the same RegExp instance will cause its internal lastIndex state to be incremented and not reset thus failing subsequent matching character in the same string to produce false when calling .test() method.