Runestone
Runestone copied to clipboard
Fix CRLF line endings correctly when preparing text for insertion
When editor was set to CRLF line endings, and pasted text already contained CRLF endings, this function would not apply line ending changes correctly. Here we first split the text separating by any kind of new line character and then join them with the correct line ending.