Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 155 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

In the question list, I saw the question Pre and Post in a Block[] displaying incorrectly.

The question displays correctly on the question page itself.

That question's body is:

Why does

    Block[{$Pre = ( 1 + #) &}, 1]
produce `1` while

    Block[{$PreRead = Print["hi"]}, 1]

In the `Block` block, shouldn't the expression have it's `Pre` evaluation as well?

It shows up in the list as:

Weird box thingy

The HTML of the excerpt in the question list is

        <h3><a href="/questions/13501/pre-and-post-in-a-block" class="question-hyperlink">Pre and Post in a Block[]</a></h3>
        <div class="excerpt">
            Why does

Block[{$Pre = ( 1 + #) &amp;}, 1]

produce 1 while

Block[{$PreRead = Print["hi"]}, 1]



In the Block block, shouldn't the expression have it's Pre evaluation as well?


which is what you expect (no weird box). It seems that Mathjax is misinterpreting the $ signs in the code and trying to render it as an equation.

This bug probably occurs on any site that has Mathjax enabled, but Mathematica.SE is most likely to see the issue since it uses both $math$ and code containing $ signs.

Similar to these issues (but distinct, since both are fixed):

share|improve this question
up vote 2 down vote accepted


We strip out html tags when building a post's summary, so the normally MathJax suppressing <code> tags aren't there.

Starting in the next build we'll start wrapping things that were once wrapped in code in style-less (but still MathJax suppressing) elements, so this problem shouldn't happen anymore.

share|improve this answer
It's now working properly. – Mechanical snail Nov 22 '12 at 6:33

You must log in to answer this question.

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