Comments (5)
Addendum
What I meant with
Problem first noticed in Gutenberg version 16.9.0.
is that 16.9.0 was the first version I noticed markup issues with code blocks (EOL completely missing, everything came on line line). Now with 17.2.0 the <br>
's are added withing <pre><code>
from gutenberg.
Thanks for the report.
I was also able to confirm this symptom, but I think this behavior is an intentional change.
The PR related to this change is #55999, which mentions:
Now all rich text values serialise the same way, with line breaks always serialising to the HTML BR tag.
I don't think this behavior is a bug, so I'd like to close this issue, but if there's anything I've missed, please comment.
from gutenberg.
Thank you for your reply @t-hamano . Can't say I'm happy with it though...
Apparently, it's allowed to use <br>
in <pre>
according to the HTML specifications (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre#technical_summary, https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#phrasing_content) but it's changes like these that break sites. Since Gutenberg 16.9.0 -for as far as I remember- my site's code blocks are all messed up, without any indication why.
And now I still have to edit every post to fix code blocks, because I guess this isn't getting reversed.
from gutenberg.
Is the code block you're using from Gutenberg core? If so, I think this should be fixed on Gutenberg's side.
from gutenberg.
Is the code block you're using from Gutenberg core? If so, I think this should be fixed on Gutenberg's side.
Yes, it's the Gutenberg core code block. But I have had "syntax highlighting" plugins installed, so there is no telling what is in my database now :) I removed those plugins a while ago.
Just tested it quickly: I do have to edit a code block. First image is how a random posts code block looks, second image is after editing (I added EOL's until </filter>
, but pressing Update fixed the entire block. Caveats:
- Other blocks remain unchanged (image 3)
- only opening the "edit post" page en pressing "Update" doesn't do anything to fix the block. I have to change the block. See image 4, which is image 3 after inserting an space.
/edit: fixed image order
from gutenberg.
Related Issues (20)
- File Block: PDF preview not working on Classic Themes HOT 1
- Site Hub: Make the View Site link always visible HOT 2
- Navigation Block > Submenu: clarify that "Open on click" settings doesn't apply to Overlay Menu HOT 1
- Not possible to mock packages that use private APIs HOT 2
- Improve the UI to switch back from Template editing mode
- Navigation Block: Overlay Menu toggle not working on Classic Themes HOT 1
- Previous / Next Post links for single templates should include Show Label toggle
- [Flaky Test] save flow should work as expected
- Post Navigation Link Block does not honor linkLabel in edit mode
- Featured Image: Do not hide the Replace button from assistive technologies HOT 3
- Template menu: Fix semantics of the Preview template menu item HOT 1
- Template menu: Focus loss when closing the Create new template modal dialog HOT 2
- Can't edit search block after setting it to "button only"
- Search button is cut off in "button-only" mode in navigation block HOT 1
- Improvements to Grid Layout and Subgrid support HOT 2
- Support AVIF photo communal house and insert AV1 video along with product photos HOT 2
- [Flaky Test] can view a template part HOT 1
- Copy/pasting a link from plain text causes autolinking to not work HOT 2
- Template option not showing in components panel HOT 3
- Proposal: Support module metadata in block.json for Blocks + Modules API HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
tags for empty lines within