WordPress/gutenberg

Backticks in Code block produce nested <code> tags

Ouverte

#28 926 ouverte le 10 févr. 2021

 (1 commentaire) (0 réaction) (0 personne assignée)JavaScript (3 893 forks)batch import
Good First Issue[Block] Code[Status] In Progress[Type] Regression

Métriques du dépôt

Stars
 (9 607 étoiles)
Métriques de merge PR
 (Merge moyen 12j 18h) (509 PRs mergées en 30 j)

Description

Description

If you try to add open and closing backticks inside of a "Code" block, then it produces a nested <code> block inside of it. The same is true of the Preformatted block

Step-by-step reproduction instructions

  1. Create a new code block (or preformatted block)
  2. Add text inside of two backticks
  3. The text will be transformed into a <code> element, nested inside of the block

Expected behaviour

Backticks should retain their original formatting and not transform.

Actual behaviour

Backticks are converted into a <code> element

Screenshots or screen recording (optional)

Code snippet (optional)

WordPress information

  • WordPress version: 5.6
  • Gutenberg version: Not Installed
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes

Device information

  • Device: Desktop
  • Operating system: MacOS 11.2
  • Browser: Firefox 86

Guide contributeur