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
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
To add some more detail, the result is the same when the destination file is either Linux format or Windows format
Thanks for reporting. I couldn't quite reproduce this.
Can you try to add a "trim" to https://github.com/wikimedia/mediawiki-extensions-PreToClip/blob/1.0.12/resources/ext.preToClip.js#L19 ?
var clipboardText = pre.innerText.trim();
Or maybe better remove "carriage returns"
var clipboardText = pre.innerText.replace(/\r/gm, "");