A few observations: ($ \{a,b\}
is completely optional and has nothing to do with what you observe, so here's a smaller example
$ now you can never leave the code block.
Not on a new line.
Not in a new paragraph.
You are forever in the code block.
Until you say the magic word: dollar sign. $
Similarly,
($ $ again you can't leave the code block.
Not on a new line.
Not in a new paragraph.
You are forever in the code block.
$ on we go until we don't know what nonsensical stuff to write and hit enter
and that brings us out.
The first dollar sign seems to be ignored by the engine due to the parenthesis right before it while the second opens a block which is then closed by the last dollar sign.
It doesn't seem to work with the back-ticked code blocks.
The block quote environment:
$ in a block quote we (new line)
we have a similar
thing: new lines and new paragraphs are ignored.$ and
out we go
($ $ just another test
new line
new paragraph
$ and
out we are.