3 ms·
Github uses Linguist for syntax highlighting and has a section in their CONTRIBUTING document for fixing bad syntax highlighting [0]. Admittedly I couldn't fig
by TheAceOfHearts 4y ago
Github uses Linguist for syntax highlighting and has a section in their CONTRIBUTING document for fixing bad syntax highlighting [0].
Admittedly I couldn't figure out exactly what repo is being used for Java's syntax highlighting since vendor/README.md says Java is using tree-sitter/tree-sitter-java and grammar.js in that repo appeears to already include references to record.
languages.yml [1] shows ace_mode java, and ace editor's java_highlight_rules.js doesn't mention record anywhere. I'm not clear if github is using ace editor or code mirror, since both are mentioned there.
Hopefully this helps get started on improving the poor syntax highlighting experience.
[0] https://github.com/github/linguist/blob/master/CONTRIBUTING.md https://github.com/github/linguist/blob/master/CONTRIBUTING....
[1] https://github.com/github/linguist/blob/c34f887f48d81e2ed42b59825fa5fe12d3918d63/lib/linguist/languages.yml#L3194 https://github.com/github/linguist/blob/c34f887f48d81e2ed42b...
[2] https://github.com/ajaxorg/ace/blob/a2e89b94b4dcdff28bf3c8f4cb90ff008b13d0bd/src/mode/java_highlight_rules.js https://github.com/ajaxorg/ace/blob/a2e89b94b4dcdff28bf3c8f4...