The following code example on meta renders without any syntax highlighting, despite a syntax highlighting directive:

from math import sqrt

class Triangle:
    def hypotenuse(self):
        # equation 2
        return sqrt(self.a**2 + self.b**2)

(The directive used here is <!-- language: lang-py -->.)

On mainsite it renders fairly prettily:

the same code example with pretty colored syntax highlighting

The lack of syntax highlighting impacts the readability of meta documentation, such as in this Mathjax documentation here which includes the above Python block — as a screenshot, not as an actual code block, so as to get the code syntax highlighted properly to demonstrate what this would look like mainsite.

  • 1
    For what it's worth, it looks like there is syntax highlighting on SO meta; when I did a quick copy / paste of this question over there, the preview rendered both with color coding. – Pikalek Jun 19 at 17:18

You must log in to answer this question.

Browse other questions tagged .