Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 157 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

I usually post Mathematica code on SO. I saw the syntax highlighter started recognizing Mathematica syntax some time ago, but inconsistently. Really don't know if this is a bug, and if the SO crew can do something about it. Anyway:

When I am posting code, I see it renders OK:

enter image description here

However, after saving edits, I see:

enter image description here

Any ideas? Is this a bug? You can see this answer here.

share|improve this question
up vote 1 down vote accepted

Apparently the and tags have no language associated with them so you see no highlighting (not even on questions tagged mathematica alone). The highlighting you see in the editor doesn't always reflect what you will see in the final view. The editor and what you saw elsewhere probably was using the default highlighting scheme at the time (though oddly, I do not see it if I view your answer through the editor).

If you want to ensure that it has its highlighting, use some language hints for your code (perhaps lang-default). That way, despite not having a language chosen from the tags, your answer will still contain highlighting.

Do note however that if you do this, you might not see the highlighting if used on multiple blocks (at least, it doesn't seem to be fixed yet).

share|improve this answer
To see the highlighting you have to modify some code, only then it shows up. – Dr. belisarius Apr 19 '11 at 18:34
@Wether: Ah I see it now. Even shows updated looking at the HTML source. I guess that's the pretty printer language detector at work determining what sort of language to use and chose lang-default. – Jeff Mercado Apr 19 '11 at 18:37

You must log in to answer this question.

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