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

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

1 Answer 1

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. –  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 .