Closed Error when pasting code in post editor

MillhioreBT

Member
Affected version
current version
I've had this problem with the post-thread editor for quite some time now, I don't know why no one has talked about it or have they?
What happens is the following:

Open a block of code
Copy some well-formatted code with its corresponding line breaks
Paste in the code block

Expected result:
The code copied correctly with its corresponding format.
example.lua
Code:
local x = 0

function test()
    local var = 0

    if x == 0 then
        var = 1
    end

    return var
end

Current result:
The code is copied without line breaks, so the code will be completely compacted and looks horrible
example.lua
Code:
local x = 0
function test()
    local var = 0
    if x == 0 then
        var = 1
    end
    return var
end

Important to note that the problem occurs to all existing code blocks in the publication, so if you had already manually fixed the line breaks, but you need to update the code or forgot to add another block, you will have to add all the line breaks of all the code blocks again.

Doing quick tests I realized that the action that makes this happen is the act of pasting text, for example CTRL + V or the option with the click
 
Automated triage: Not a bug

Thank you for reporting this issue. This report is quite old, and the editor and its underlying library have both been replaced since then. Nothing more recent confirms the problem. If blank lines in code blocks still disappear when you paste on the current version, please open a new report with up-to-date steps and your browser.

This is an automated assessment. A member of staff may review and update it.
 
Back
Top Bottom