The main regex in src/index.ts is functionally correct but difficult to read and understand. This affects maintainability and onboarding of new contributors.
Suggested Fix
Extract named parts (e.g., word matcher, boundary matcher) into constants and add inline comments for each group.
Goal
- Preserve exact functionality
- Improve readability
The main regex in
src/index.tsis functionally correct but difficult to read and understand. This affects maintainability and onboarding of new contributors.Suggested Fix
Extract named parts (e.g., word matcher, boundary matcher) into constants and add inline comments for each group.
Goal