paste-lines.js splitLines() now strips whitespace-only text nodes between .codeline blocks after rebuilding innerHTML — under white-space: pre any surviving whitespace-only node renders as a phantom row, drifting gutter numbers from their lines (issue #205).
renumber() geometry unchanged; wrap OFF behavior unchanged.
highlight.go comment documents that the server-side \n join is the splitLines delimiter by design; test comment updated.
QA (local serve, measured via CDP)
Python paste (long/blank/tab lines): wrap ON — max drift 0px @1400x900 and @375x812; no horizontal scroll. Wrap OFF — horizontal scroll preserved.
plain/text paste: same, max drift 0px both viewports.
Zero whitespace-only text nodes in rendered DOM; console clean, no CSP violations.
## Summary
- paste-lines.js splitLines() now strips whitespace-only text nodes between .codeline blocks after rebuilding innerHTML — under white-space: pre any surviving whitespace-only node renders as a phantom row, drifting gutter numbers from their lines (issue #205).
- renumber() geometry unchanged; wrap OFF behavior unchanged.
- highlight.go comment documents that the server-side \n join is the splitLines delimiter by design; test comment updated.
## QA (local serve, measured via CDP)
- Python paste (long/blank/tab lines): wrap ON — max drift 0px @1400x900 and @375x812; no horizontal scroll. Wrap OFF — horizontal scroll preserved.
- plain/text paste: same, max drift 0px both viewports.
- Zero whitespace-only text nodes in rendered DOM; console clean, no CSP violations.
- go build ./... && go test ./... pass.
Closes #205
paste-lines.js rebuilt the codebody with innerHTML but relied on the
server-side '\n' delimiters disappearing between the per-line blocks.
Under white-space: pre any whitespace-only text node that survives
(cached HTML, template drift) renders as a phantom row and drifts the
gutter numbers off their lines. splitLines() now strips whitespace-only
text nodes after rebuilding, keeping renumber() geometry intact.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
QA (local serve, measured via CDP)
Closes #205
fen referenced this pull request2026-09-10 18:15:28 +00:00