Support footnotes in client-side deserializer
What does this MR do and why?
-
NOTICE: This change is behind a the
preserve_unchanged_markdown
feature flag. - Context: This change is part of a larger effort to preserve unchanged Markdown in the Content Editor. For this effort, we need to support client-side parsing of Markdown content.
This MR implements support for GFM footnotes in the client-side Markdown parser/renderer for the Content Editor. It also preserves the original footnotes source when the user doesn’t change them in the Content Editor.
Screenshots or screen recordings
How to set up and validate locally
-
Enable the
preserve_unchanged_markdown
feature flag. -
Edit or create a Wiki page in your local environment.
-
Add the following tables in the Classic Markdown Editor
This is a footnote reference [^footnote] [^footnote]: Footnote definition
-
Switch to rich text mode
-
Add a paragraph anywhere in the document
-
If you switch to Source mode again, you will notice that the original footnotes source is preserved. This doesn’t happen without the feature flag enabled.
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 #359014 (closed)