Preserve leading spaces in code
What does this MR do and why?
Preserve leading spaces in code
In RTE, when coming from a plain text editor, if an inline code block contains leading spaces, preserve them. Also make sure they are preserved after serialization.
Changelog: fixed
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Before | After |
|---|---|
|
|
|
How to set up and validate locally
- In a text box, using plain text editor, type in an inline code block with leading spaces. Example:
` code`. - Switch to RTE. The leading spaces should be preserved.
- Add some text to RTE.
- Switch back to plain text editor. The leading spaces should still be preserved.
Related to #442106 (closed)
Edited by Himanshu Kapoor