Page MenuHomePhabricator

SyntaxHighlight: Line numbering causes line breaks in text selection/clipboard
Closed, DuplicatePublic

Description

  1. Open https://meta.wikimedia.org/wiki/User:Krinkle/global.js
  2. Select some lines of text, and copy to clipboard.
  3. Paste somewhere.

Actual:

	var prevPortlet;

	var perfMenu;

	var item;

Expected:

	var prevPortlet;
	var perfMenu;
	var item;

It seems the recent addition of line numbers in the layout has caused a block element or other line break to be perceived by the browser.

When I set pre span > a { display: none; } the issue goe away, which confirms the relation between the two.

Browser: Firefox 84 on macOS 10.15.

See also