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:
parent
19b3bf550f
commit
908f1381a0
4 changed files with 241 additions and 15 deletions
Loading…
Add table
Add a link
Reference in a new issue