mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-11 21:57:14 +03:00
* 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>