Seen this come up a few times so just to be clear: there seems to be a bug around spoiler tags.
You can do them inline like this <- like that.
Or you can enclose a paragraph with them, but in which case the opening and closing tags should each be on their own line.
But you can’t mix and match
Basically : put your tags on their own lines