What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

It looks like on StackExchange sites that have MathJax enabled, certain placements of $ characters inside code blocks can prevent the code block from ending.

Here's an example post where this has happened. Please see the longest code block: the middle should be text, but it is rendered as code.

I managed to come up with a minimal example. The following markdown,

    $ this is code

this is text

$

renders like this:

$ this is code

this is text

$

(i.e. the middle text line appears as code).

example image

share|improve this question

1 Answer 1

up vote 7 down vote accepted

The improved Markdown/LaTeX separator now handles this case. I've made an edit to the post to force rebuilding the HTML – and remove the sentence noting that something is broken :) – and it now looks as expected.

Your minimal example now works correctly as well.

share|improve this answer
    
There's another note about the broken rendering at the beginning of the post. I removed that one as well. Thanks! :-) –  Szabolcs May 31 '12 at 13:43
1  
There are some problems again with $ signs and code blocks. Try this on a MathJax enabled site: pastebin.com/hpBfYs79 The second code line will have extra indentation. Again, this comes up on Mathematica.SE in practice, because Mathematica tends to use $ signs (for example, in this post, if the second, empty, line of the code block is removed.) –  Szabolcs Dec 8 '12 at 17:18

You must log in to answer this question.

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