Display Certain Code Blocks as Normal Markdown In Editor

I am writing a plugin that uses a custom code block to display some content before and after the inner markdown. As such, I am wondering if there is a way to display this with the usual syntax highlighting in edit view. For an example, let’s say I have the code block:

This is some text, which may have arbitrary markup, including maths blocks:
    x = y

I would like the edit view in Obsidian to display the inner part of the code block as just normal markdown, with the usual syntax highlighting, especially for maths blocks, rather than just appearing as a grey code block.

Is there a way to do this, either with a plugin or custom CSS?