Multi-line Code blocks from WP 5.5 lose line breaks when GB active #26301
Labels
[Block] Code
Affects the Code Block
[Priority] High
Used to indicate top priority items that need quick attention
[Type] Bug
An existing feature does not function as intended
[Type] Regression
Related to a regression in the latest release
Given an Code block with the content:
In WP 5.5 when Gutenberg is inactive, this is rendered in the editor as follows:
When activating Gutenberg, however, this gets rendered in the editor as:
This appears to be a regression introduced in v9.1 with allowing HTML editing and rich text in the Code block: #24689, since the block's
content
attribute changed from atext
source to anhtml
source. This is in spite of the fact that the code is still in apre
.If I try recreating this Code block with Gutenberg active, then I get this saved content:
Note that
<br>
tags are now needed to represent line breaks instead of newline characters.Is there a block deprecation function missing here?
cc @ellatrix @mkaz
The text was updated successfully, but these errors were encountered: