Root cause: paste-lines.js joined the display:block.codeline spans with newline text nodes. Inside the white-space: pre codebody each of those text nodes renders as an extra empty line box, doubling the visual line spacing and desyncing the gutter in both wrap and no-wrap modes.
number only real lines: a paste ending in a newline no longer gets a phantom trailing number
Verified rendered in headless Chromium against a local build: gutter/code heights match exactly (delta 0) in both modes; wrapped long lines get one gutter number per visual row with blanks on continuation rows; no-wrap keeps one number per logical line; go build ./... and go test ./... pass.
Fixes #194
Root cause: `paste-lines.js` joined the `display:block` `.codeline` spans with newline text nodes. Inside the `white-space: pre` codebody each of those text nodes renders as an extra empty line box, doubling the visual line spacing and desyncing the gutter in both wrap and no-wrap modes.
Changes (internal/web/static/paste-lines.js only):
- join spans with no separator (blocks need none)
- number only real lines: a paste ending in a newline no longer gets a phantom trailing number
Verified rendered in headless Chromium against a local build: gutter/code heights match exactly (delta 0) in both modes; wrapped long lines get one gutter number per visual row with blanks on continuation rows; no-wrap keeps one number per logical line; go build ./... and go test ./... pass.
- paste-lines.js: join .codeline spans with no separator; newline text
nodes between display:block spans in the white-space:pre container each
rendered as an extra empty line box, doubling visual line spacing and
desyncing the gutter in both wrap and no-wrap modes
- number only real lines: a paste ending in newline produced a phantom
trailing number (6 for 5 lines)
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.
Fixes #194
Root cause:
paste-lines.jsjoined thedisplay:block.codelinespans with newline text nodes. Inside thewhite-space: precodebody each of those text nodes renders as an extra empty line box, doubling the visual line spacing and desyncing the gutter in both wrap and no-wrap modes.Changes (internal/web/static/paste-lines.js only):
Verified rendered in headless Chromium against a local build: gutter/code heights match exactly (delta 0) in both modes; wrapped long lines get one gutter number per visual row with blanks on continuation rows; no-wrap keeps one number per logical line; go build ./... and go test ./... pass.
Pull request closed