In reg-ex.component.tsbuildHighlightedTextSegments, zero-width matches (lookaheads/lookbehinds) are supposed to render as a single-space match marker after the breakpoint sweep.
That append runs afterif (ranges.length === 0) return [{ text, cssClass: "" }]. Positive-length matches skip len === 0 when building ranges, and empty hint spans are also skipped. So a pattern like (?=a) against "a" produces no ranges, hits the early return, and never paints the lookaround marker.
The marker does appear when mixed with a positive-length match (the early return is skipped).
Fix: run the zero-width append before the empty-ranges return, or don't return early when matches.some(m => m.length === 0).
Found by Wave 7 coverage (agent a8) — characterization test in reg-ex.lessons.spec.ts.
In `reg-ex.component.ts` `buildHighlightedTextSegments`, zero-width matches (lookaheads/lookbehinds) are supposed to render as a single-space `match` marker after the breakpoint sweep.
That append runs **after** `if (ranges.length === 0) return [{ text, cssClass: "" }]`. Positive-length matches skip `len === 0` when building `ranges`, and empty hint spans are also skipped. So a pattern like `(?=a)` against `"a"` produces **no ranges**, hits the early return, and never paints the lookaround marker.
The marker **does** appear when mixed with a positive-length match (the early return is skipped).
**Fix:** run the zero-width append before the empty-ranges return, or don't return early when `matches.some(m => m.length === 0)`.
Found by Wave 7 coverage (agent a8) — characterization test in `reg-ex.lessons.spec.ts`.
Resolved in spikersoft-angular PR #819 (merged to master). RegEx overlay keeps lookaround markers when every match is zero-width. Closing.
Resolved in spikersoft-angular [PR #819](https://git.spikersoft.com/spikerj/spikersoft-angular/pulls/819) (merged to `master`). RegEx overlay keeps lookaround markers when every match is zero-width. Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
In
reg-ex.component.tsbuildHighlightedTextSegments, zero-width matches (lookaheads/lookbehinds) are supposed to render as a single-spacematchmarker after the breakpoint sweep.That append runs after
if (ranges.length === 0) return [{ text, cssClass: "" }]. Positive-length matches skiplen === 0when buildingranges, and empty hint spans are also skipped. So a pattern like(?=a)against"a"produces no ranges, hits the early return, and never paints the lookaround marker.The marker does appear when mixed with a positive-length match (the early return is skipped).
Fix: run the zero-width append before the empty-ranges return, or don't return early when
matches.some(m => m.length === 0).Found by Wave 7 coverage (agent a8) — characterization test in
reg-ex.lessons.spec.ts.Resolved in spikersoft-angular PR #819 (merged to
master). RegEx overlay keeps lookaround markers when every match is zero-width. Closing.