Open wadetregaskis opened 4 months ago
Are you adding something within the code block or outside in another block?
A <br>
should not render as a new line within the code block.
Am I understanding it correctly? Do you have a URL or a screenshot?
That's correct.
The footnote is added outside the code block. e.g.:
If I now place the cursor after the word "etc" and insert a footnote, it immediately becomes:
Worse, this cannot be undone (the undo arrow in the WordPress toolbar is enabled but does nothing when clicked, and likewise ⌘Z does nothing).
Is the footnote block a plugin? Maybe I can debug what's going on if I reproduce it.
It's built into WordPress (since version 6.3).
Okay I thought so but couldn't find it. I'll look into it and follow up when i figure out what's going on.
Looks like this broke in 6.5 specifically. I'll need to debug some more to see if there's something I can do to intercept their code. It seems like they are re-injecting the block but mangling the formatting. Further, like you mention, it doesn't add to the edit history. Might need to patch the footnotes block, which could take time.
For now, maybe you can add the footnotes before the blocks? I know that's not very convenient but I can't think of any other temporary workaround.
Yeah, that's essentially what I've been trying to do.
Thanks for looking into it. Is it a WordPress bug? It sounds like it shouldn't be mucking with your plug-in's block.
Whenever a footnote is added, all Code Block Pro blocks on the page mangle their contents, replacing actual line returns with the literal text
<br>
.This has been happening for a while (months or more), but I feel like it didn't always happen.
WordPress 6.5.5 with Code Block Pro 1.26.4 currently.