Skip to content

Support footnotes in client-side deserializer

Enrique Alcántara requested to merge 359014-preserve-gfm-footnotes into master

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

2022-06-12_18.37.42

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.

Related to #359014 (closed)

Edited by Enrique Alcántara

Merge request reports