Extending the WordPress Code block with syntax highlighting rendered on the server, thus having faster frontend performance and being AMP-compatible.
GNU General Public License v2.0
118
stars
11
forks
source link
Fix compatibility with Gutenberg 17.1 after it removed preserveWhiteSpace serialisation differences #791
Closed
westonruter closed 9 months ago
Fixes #790.
In Gutenberg 17.1, I paste the following into a new Code block:
When I look at the
post_content
, it shows the block markup as follows:This gets rendered as:
When this is what is expected:
This PR fixes the problem by ensuring
BR
tags are replaced with newlines before applying syntax highlighting.