I sometimes like to use the ability to hide text when writing an answer, but I've noticed that when I try to write something in display math mode (i.e. maths wrapped in double dollar signs), it doesn't display as such but rather as regular maths mode (i.e. as if the maths was wrapped in single dollar signs). When I try to fix this, the text no longer remains hidden.
This answer is what made me ask this question. If anyone knows a way around this, please let me know.
Added later: It appears that when the answer is submitted, the relevant math is displayed in display math mode, but in the writing (or editing) process, it is only displayed in regular math mode. Thanks to Martin for pointing this out. I have added the bug tag.