Improve Code extension input rules for inline code handling

What does this MR do and why?

This MR updates the Code extension’s addInputRules implementation to correctly handle inline code delimiters. Previously, input rules were incorrectly triggered even after the closing backtick of inline code, causing backticked text to be replaced or re-interpreted unexpectedly.

References

Closes #577481 (closed)

How to set up and validate locally

  1. Open any Markdown field that uses the Content Editor.

  2. Type two backticks: ``

  3. Inside those backticks, type any text, for example: `code`

  4. Place the cursor immediately after the closing backtick.

  5. Type any character (space, letter, number, etc.).

Expected:

  • The inline code should remain unchanged.
  • The input rule should not trigger or transform the text.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading