Prevent mutation of line endings in the single file editor
What does this MR do and why?
Prevents mutating line endings in the single file editor by querying the file contents from the backend instead of getting it from editorEl.innerText
.
Getting the value from editorEl.innerText
mutates line endings from \r\n
to \n
. So querying the raw contents directly from the backend should prevent the mutation. Note, the backend still returns mutated line endings when querying the file contents, this will be taken care of in a follow-up.
Screenshots or screen recordings
No visual changes are expected, editing or creating a file via the single file editor should work exactly as it did before.
How to set up and validate locally
- Open any source code in the Single file editor
- Editing the file should still work like before
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #426805 (closed)