I started working on something over the weekend actually but I just need more time for it. If you can hold out a bit longer I’ll get to it.
But to reiterate the reasons why it’s set up this way, this block will pre-render the expensive computational stuff as you type in the editor. There is no server rendering, and no in-browser formatting. This gives the code block near zero page performance overhead. So it’s a tradeoff. I wouldn’t be able to server render it regardless since it’s using the webassembly runtime in the browser.
Another reason is that some users use different language, theme, and setting combinations. I consider that a special feature, although I can see it not being used by a majority.
So what I need to build is something that will identify from the database all the posts that contain the code block, and provide an interface to update them all in once, or selectively update some. It will have to use Gutenberg’s block rendering engine and reinsert the post back into the database, which also means I need to make sure edits are recoverable in case something breaks.
It’s an exciting feature actually and I’m motivated to implement it!