Skip to content

Resolve "Undefined code blocks and strange rendering in the Content Editor"

What does this MR do and why?

This MR fixes a regression in the Content Editor. The Content Editor treats Markdown code blocks as frontmatter code blocks. The consequence is that the Content Editor tries to render a code block as frontmatter and fails. See the screenshots for before and after results of this change for better understanding of the problem.

Screenshots or screen recordings

Action/state Before After
Creating a code block before-code-block-bug after-code-block-bug
Resulting Markdown before-resulting-markdown after-resulting-markdown

How to set up and validate locally

  1. Edit a Wiki page or create a new one.
  2. Click "Use new editor" button.
  3. Create a code block by typing ``` followed by a space. This input rule should create a code block not a frontmatter block

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 #345425 (closed)

Edited by Enrique Alcántara

Merge request reports