1 Commits

Author SHA1 Message Date
Tibsfox
6d429da660 fix(milestone): replace test()+replace() with compare pattern to avoid global regex lastIndex bug (#1923)
The requirement marking function used test() then replace() on the
same global-flag regex. test() advances lastIndex, so replace() starts
from the wrong position and can miss the first match.

Replace with direct replace() + string comparison to detect changes.
Also drop unnecessary global flag from done-check patterns that only
need existence testing, and eliminate the duplicate regex construction
for the table pattern.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 17:26:31 -04:00