Topic on Extension talk:PreToClip/Flow

Double end line characters

4
79.116.74.254 (talkcontribs)

Hi

Using MW 1.42.3, the copied source code gets a double "end line characters" for every line.

For example

line 1
line 2
line 3

line 4

gets copied as

line 1

line 2

line 3



line 4

79.116.74.254 (talkcontribs)

To add some more detail, the result is the same when the destination file is either Linux format or Windows format

Osnard (talkcontribs)
Osnard (talkcontribs)

Or maybe better remove "carriage returns"

var clipboardText = pre.innerText.replace(/\r/gm, "");
Reply to "Double end line characters"