Code Block Formatting Messed Up
-
Hi there! We noted that our code blocks on Sunday were all messed up with line wrapping disabled, which impacts indexing (since the text is now cut off visibly).
We updated CSS to re-enable wrapping, but now some URL’s with code blocks have a bunch of additional CSS that inserts extra white space and ignores the word wrapping.
The code block settings are the same on both pages, but the display is different?
This page has weird formatting on the code block at the bottom:
https://shugyokai.org/shugyo/what-is-shugyo/
This page is displaying correctly, and the code block HTML view is formatted the same:
https://shugyokai.org/shugyo/aikido/ueshiba-morihei-doka/doka-205-as-your-sole-means/
Why did you change this?
Latex G.N.R. Space-CoyoteThe blog I need help with is: (visible only to logged in users)
-
So this is odd, why are extra cm-editor, cm-scroller, and cm-line div’s appearing in some code blocks and not others. What is cm-editor and cm-scroller? This is ALOT of bloat.
Can you turn off whatever is doing this to my site and give me my old code blocks back? -
Just so you know, it’s inserting cm-editor, cm-scroller, and cm-line div wrappers all over the code block in generated HTML. It’s really inflating the HTML and is breaking the display of plain text and removing wrapping. What’s interesting is that this is inconsistent, and probably has to do with older HTML in cached pages.
This seems to be code from https://codemirror.net/. I tried finding a plugin for this, and it looks like perhaps WordPress.com now includes this in plans, but I am not sure regression testing really tested this fully.
Where is this coming from? The code blocks are broken and are less SEO friendly. -
Hi @latexspacecoyote, thanks for reaching out.
I can see the support ticket that was created for this issue, and I understand how frustrating it can be to run into something like this and need to follow it in more than one place. I want to reassure you that it’s being tracked properly.
The issue itself has been resolved for now using a custom CSS adjustment you added. Thank you for that, which should keep everything working as expected. In addition, we’ve logged this as a reported issue for our development team to review, and any updates or next steps will be shared with you directly through the support ticket.
Since the immediate problem is resolved, we’ll go ahead and close this forum thread to avoid duplicate updates. Please keep an eye on the ticket for further communication, and don’t hesitate to reach out again if you need anything else in the meantime.
Thanks again for your patience and for bringing this to our attention.
-
-
Got it, thanks for calling that out
Let’s pause on CSS for a moment.Before we go any further, I need to confirm one small but important detail so we don’t head in the wrong direction.
Are the affected pages edited with the newer Code block (the one that shows syntax highlighting and a language selector in the editor), or are they using older / classic code blocks that were added years ago?
-
Hi there, I can’t respond to anything. I’ve tried. I must be blocked.
I created all these with the old code block, and then any page I edit and save turns into the new code block it seems. The amount of HTML emitted for a simple text block that uses monospace font is excessive now. I just want an old plain text block with the browser’s monospace font without going to every page on my site and changing things. Do you know how many pages we have to change? Hahahaha!
How do we just get the old code block for plain text with word wrapping? -
Hi there!
I’ve had a look at your case and read the chat you had with my colleague the other day. I hear you; the CSS workaround we shared with you isn’t perfect, as it would require lots of manual adjustments.
I saw my colleague make an internal report after the chat you had, where we asked our developers to add a text wrap option. We haven’t heard back from them yet, so I’d like to wait to have an update there before making any more changes. I’ll send you an email so we can stay in touch. It’ll be quicker than waiting here in the forums for someone to reply.
That said, I’d also like to hear more about how you are using the block, so I can understand the issue here, as I don’t think that just fixing the wrapper is going to be enough to solve all the issues, and we might want to look for an alternative.If you don’t mind, please follow up with me in that email, and we’ll sort this out together!