We've been working hard to update the Mathematica portion of highlight.js, and it was merged into the main repository some time ago. It fixes all kinds of issues with the old version, e.g. it supports the whole range of Mathematica's crazy way to input numbers:
If you look at the implementation, you'll find that we use detailed CSS classes that will default to standard classes. However, it gives the opportunity to adapt the colours specifically for Mathematica in greater detail.
Here is a list of all exposed CSS classes and how they should be coloured:
symbol
,named-character
,operator
,brace
: Normal variables and code that should just be coloured black like it is now.builtin-symbol
: The keywords of the language. The blue that's used right now is finenumber
: Numbers that should have a dark reddish colour. Probablystring
,message-name
: Should probably have the same colour as numbers. Definitely not green please, because that's what we need for...pattern
,slot
: special pattern-like expressions that are coloured green in Mathematica and users expect them to be green with the highlightercomment
: The grey that's used right now is fine
Question: Can we get an update of the Mathematica highlighter for our site?
feature-request
tag?