Files
pbakaus_impeccable/plugin
f636bd065a fix(live-inject): preserve the character after an insertAfter anchor (#227) (#230)
* fix(live-inject): preserve the character after an insertAfter anchor

insertTag()'s insertAfter branch sliced the post-anchor remainder by
prefix.length. When the anchor was not already followed by a newline,
prefix is one character longer than the anchor (the appended '\n'), so
content.slice(prefix.length) dropped the first real character after the
anchor — e.g. `<head>X...` lost the `X` during live-mode injection (#227).

Slice the remainder from the original anchor offset instead. The
insertBefore branch and the already-followed-by-newline case are
unchanged. Add a regression test for both the no-trailing-newline and
newline cases, and regenerate the tracked per-agent bundles so the fix
ships everywhere.

Fixes #227. Root-cause analysis from the issue reporter.

* Fix live inject CRLF insertAfter handling

---------

Co-authored-by: Paul Bakaus <paul.bakaus@gmail.com>
2026-06-08 18:45:12 -07:00
..