highlight.js
highlight.js copied to clipboard
GitHub theme highlighting is wrong
Hey, I was trying the github theme on the website playground, but when I compare it to the code in the README on Github, its not exactly the same:
And on GitHub:
Interestingly, when the language is set on '(auto)', the output is slightly close to GitHub's highlighting:
Expected Behaviour
The class (or namespace that sharts with uppercase) should be highlighted, and the method should also be highlighted.
We may classify some things entirely differently (in general) than GitHub, so there will never be an exact match. Also different grammars sometimes classify things differently - so in one grammar if is a built-in, in another it's a keyword... so themes can look very different depending on the language you pick. Not optimal, but it's legacy.
Also Github's own theme has changed across time as well, so that could be another issue here.
Also I'm not sure our Python grammar supports attributes/properties (ie, some.property)... so that might explain why it's so boring.
Would you ilke to work on this issue? Since GitHub themes change over time I'm going to close this if no one is actually wanting to fix it... It's possibly not even wrong so much as "classic", etc... plus the other things I mentioned before - about never matching exactly etc.
If you want to work on it, we can re-open it.