BUG: Pasting plain text into Code-formatted block in Rich Text field splits the block

In a Rich Text field, If I paste plain text into the middle of an existing Code-formatted block, the inserted text appears unformatted, splitting the Code block. I would expect the pasted plain text to inherit the Code formatting of the surrounding block - the same as if I typed it in.

Before paste:
image

After paste: