Preserve bold, italic, code, and link syntax in the Content Editor
What does this MR do and why?
It implements a mechanism that allows the Content Editor to remember the original syntax used to format bold, italic, code, and links.
Context
In Markdown, you can apply the same text format using different approaches, i.e. you can apply bold format in 4 ways:
**bold text** and __bold text__ and <b>bold text</b> and <strong>bold text</strong>
Currently, when the user saves changes in the Content Editor, the Content Editor will transform all bold text to the same syntax: **. After this change, the Content Editor will remember the syntax preferred by the user.
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Enable
preserve_unchanged_markdownfeature flag. - Edit a Wiki page.
- In the Classic Markdown Editor, enter the following Markdown snippet:
**bold text** and __bold text__ and <b>bold text</b> and <strong>bold text</strong> - Switch to the Rich text mode, and edit this text.
- Switch back to source mode. All the bold syntax should be preserved. You can try the same with links, code, and italic format.
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 #359019 (closed)
Edited by Enrique Alcántara

