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
Fix code blocks (with language identifiers) on webcompat.com #2774
Comments
What's happening here is that github is sending the classes they use on their website to ours directly. But since we don't have their .css it doesn't take any effect. One thing we could do is download their lib. I found this one: https://github.com/primer/github-syntax-light and I'm going to make some tests with it. |
So this is what I got after downloading this lib: The code with the word after the back ticks gets highlighted correctly, but doesn't get that little box around it. That box comes from the prism.js lib. First, we can just copy the class from prism.js and add
I think this is the only part of the prism.js code we're using, right? If yes, we could remove it and keep only the github-syntax-light lib. Another thing we could do is use this lib: https://github.com/primer/primer/blob/master/modules/primer-markdown/README.md What do you think @miketaylr ? |
No, it's doing the syntax highlighting for new comments as well. webcompat.com/webcompat/static/js/lib/issues.js Lines 502 to 509 in 0133d3d
|
This seems like a good idea.
It looks like that's all SASS, so we'd have to add a SASS pipeline into our build process which doesn't seem worth it (IMO). |
just a naive thought, but why not just renaming our |
Fixes #2774 - Fixes code blocks with language identifiers
The following is happening:
If you type something like:
It'll break on webcompat.com (not upper cased, that was fixed):
If just type your code directly after the three back ticks you'll get the correct output on webcompat:
Like shown by Mike on this issue.
The text was updated successfully, but these errors were encountered: