13
$\begingroup$

Here is a weird bug (or unexpected feature) in the MarkDown engines, probably tex related.

 ($ \{a,b\} $) 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, open-parenthesis dollar-sign: ($

New line for a new world.

New paragraph to celebrate the new me.

$\endgroup$
  • $\begingroup$ For low rep users, what I typed is available at meta.math.stackexchange.com/posts/2332/revisions and more directly at meta.math.stackexchange.com/revisions/… $\endgroup$ – Jack Schmidt Jun 9 '11 at 23:42
  • 1
    $\begingroup$ See also meta.math.stackexchange.com/questions/2559/… $\endgroup$ – Jack Schmidt Jul 15 '11 at 17:07
  • $\begingroup$ it may be a bug, but it is also one that it out of our control - it is a MathJax bug and not something we, at Stack Exchange can fix. (ed ajf) $\endgroup$ – Oded Jul 16 '14 at 10:05
  • $\begingroup$ Actually the bug has been fixed already, as you can see if you click "edit" on the question and look at the preview. At some point StackExchange must have changed their Markdown-to-HTML converter to fix the problem, but IIRC the generated HTML is not updated for existing posts, like this one, unless someone actually edits the content. So let's mark this [status-completed] and drop the matter. $\endgroup$ – Rahul Jul 16 '14 at 19:16
  • 1
    $\begingroup$ @Rahul: That might be, but the truth is that the preview render code is different from the final render code. So it might not be as solved as you might think. $\endgroup$ – Asaf Karagila Jul 16 '14 at 21:11
9
$\begingroup$

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.

$\endgroup$
2
$\begingroup$

Looks like it's been fixed already. Here's exactly the same Markdown code from the question, copy-pasted into a new answer for Asaf's benefit:


Here is a weird bug (or unexpected feature) in the MarkDown engines, probably tex related.

 ($ \{a,b\} $) 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, open-parenthesis dollar-sign: ($ New line for a new world.

New paragraph to celebrate the new me.

$\endgroup$
  • $\begingroup$ So, are we friends with benefits now? :-P $\endgroup$ – Asaf Karagila Jul 16 '14 at 22:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .