Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub theme highlighting is wrong #4089

Open
shner-elmo opened this issue Aug 7, 2024 · 2 comments
Open

GitHub theme highlighting is wrong #4089

shner-elmo opened this issue Aug 7, 2024 · 2 comments
Labels
bug help welcome Could use help from community language

Comments

@shner-elmo
Copy link

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:
image

And on GitHub:
image


Interestingly, when the language is set on '(auto)', the output is slightly close to GitHub's highlighting:
image

Expected Behaviour

The class (or namespace that sharts with uppercase) should be highlighted, and the method should also be highlighted.

@shner-elmo shner-elmo added bug help welcome Could use help from community language labels Aug 7, 2024
@shner-elmo
Copy link
Author

Highlight.js demo link

@joshgoebel
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help welcome Could use help from community language
Projects
None yet
Development

No branches or pull requests

2 participants