Skip to content

Fix serialization of unchanged inline elements in the Content Editor

What does this MR do and why?

Fixes a bug in the Content Editor’s markdown serializer that inserts a blank line after serializing inline elements line images and footnote references.

Screenshots or screen recordings

Before After
footnotes_before footnotes_after
images_before images_after

How to set up and validate locally

  1. Enable the preserve_unchanged_markdown feature flag
  2. Create or edit a Wiki page
  3. Paste the following Markdown snippet
    This is a footnote reference [^footnote]
    
    [^footnote]: Footnote definition
  4. Switch to the Content Editor by clicking the "Rich Text" button.
  5. Add some text after the footnote reference.
  6. Switch back to the Classic Markdown Editor. You will see that there isn’t a blank line between the footnote and the text you introduced.
  7. Test the same pattern with images.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports