How to fix one line “code” tag that doesn’t work in WordPress


If I have only one line, and I surround it with the code tags, it doesn’t work. I noticed this when I wrote this article:

Here’s the editor, and below it is the result. The line I surrounded with the code tags should have been appeared in a box, but it doesn’t.

To fix it, press the Enter key at the end of the line, so the ending code tag is on the next line. This way, even one line of code is displayed in a box, like in the pictures below.

Have you seen this?