Commit 5f124a2
fix(docs-audit): widen the ledger key anchor from \b to a negative lookbehind (#11710)
`declLead` anchored the `route:`/`client:` key with `\b`, which fails only against a
preceding WORD character. `$` is not one, and `$route` is a legal JS identifier, so
`$route:` was read as a declaration by all eight lead scans — agreed, and agreed by
being wrong together.
The anchor is now `symbolRe`'s set rather than `dottedRe`'s, because `declLead`'s key is
a BARE token: a preceding `$` continues an identifier, and a preceding `.` makes the
token a member access whose colon belongs to a ternary. Both minted phantom rows; the
character class closes the class instead of enumerating escapees. `-` is deliberately
left out — `a-route` is two tokens, so that `route` is the whole token and is not a
declaration for a different reason, one it shares with the bare `cond ? route : x` no
lookbehind can reach.
Unlike the previous move, this one also moves `declarationsIn` — the eighth scan, left
byte-identical on purpose last time — so it is priced with its own before/after, at row
identity rather than counter equality.
Claude-Session: https://claude.ai/code/session_015ahemw8RcTgqtxrj15PEZx
Co-authored-by: Claude <noreply@anthropic.com>1 parent c86d86a commit 5f124a2
1 file changed
Lines changed: 251 additions & 32 deletions
0 commit comments