doxa-maps/plugin-designs/regions-dashboard/scripts
Doxa Maps 02b2e9d59a The second consumer drops its copy of the highlighter
people-groups-grid is the file whose duplicate earned useTextHighlight its place in
library/ under RULE 2, and studio agreed to treat it as unowned and asked for it to
be cut. Its hand-rolled range walk is replaced by highlightRanges(value,
match.indices), and its local escapeHtml goes with it: once the loop moved, that
function had ZERO callers left.

★ ONE CORRECTION TO THE STATED REASON. studio approved this with "removing the
null-throw is reason enough". Measured before accepting it: that escaper has exactly
three callers, all inside `if (value && typeof value === 'string')`, so the throw
was NOT REACHABLE here. The library escaper's null guard is still an improvement in
principle, but it fixes nothing that could fire in this file, and I would rather
carry the smaller true reason than the larger convenient one.

The reason that does hold is the original one: the same construction existed twice,
character for character apart from variable names. One fact, one copy.

The gate flips with it — check:text-highlight now asserts this file routes through
the helper, that its escapeHtml is gone, and that the hand-rolled range walk is
really removed rather than merely shadowed by the new import.
2026-09-27 01:16:50 +00:00
..
check-embedder-keys.mjs Register the embedder-key gate so it can actually run 2026-09-26 17:10:06 +00:00
check-text-highlight.mjs The second consumer drops its copy of the highlighter 2026-09-27 01:16:50 +00:00
strip-code.mjs C4 wave 3b, cities-internet: three identical guards become one call 2026-09-26 22:06:59 +00:00