0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00

fix(router-utils): the statement after a removal keeps its own start

Removing a function-local declaration only removed code read (orphans)
left the statement after it next to the one before: `let y = foo`,
`const local = 1;`, `(mk)()` rendered as `let y = foo(mk)()`. The
renderer's statement-start guard covered an edit's own text only; it now
also guards the source statement after an edit in a nested statement list
(the module's own list has freeze's guard): a `;` when its first token
could continue what renders before it (`(`, `[`, a template, `+`, `-`,
a regular expression, `<`), after the indentation and before a comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sheraff 2026-11-03 16:25:42 +01:00
commit 908f1381a0
No known key found for this signature in database
4 changed files with 241 additions and 15 deletions