Closed Herst closed 7 years ago
Syntax highlighting on GitHub is provided by TextMate-compatible grammars, which Linguist selects to provide code colouring. For shell-scripts, the highlighting is provided by atom/language-shellscript. You should report this issue there.
Oh, OK. It was https://help.github.com/articles/creating-and-highlighting-code-blocks/ ("We use Linguist to perform language detection and syntax highlighting.") that lead me here.
It was https://help.github.com/articles/creating-and-highlighting-code-blocks/ ("We use Linguist to perform language detection and syntax highlighting.") that lead me here.
@arfon Maybe this could be slightly rephrased to explain that Linguist only selects the grammars for syntax highlighting? I'm not sure what's the best way to redirect users to those grammars though :/
@arfon Maybe this could be slightly rephrased to explain that Linguist only selects the grammars for syntax highlighting?
Yeah, that's probably worth updating to make things a little clearer.
I'm not sure what's the best way to redirect users to those grammars though :/
I mean, this list is the source of truth here but the idea of sending people to a folder of Git submodules is literally the least user-friendly thing I think I've ever thought of...
We could add a README.md
file to the vendor/
directory that lists what each language uses for syntax highlighting. Something like this, perhaps:
- 1C Enterprise: xDrivenDevelopment/atom-language-1c-bsl
- AGS Script: textmate/c.tmbundle
- AMPL: ampl/sublime-ampl
- API Blueprint: apiaryio/api-blueprint-sublime-plugin
- APL: Alhadis/language-apl
Obviously, this wouldn't be updated by hand: it'd be done automatically whenever bundle exec rake whatever
is called.
Obviously, this wouldn't be updated by hand: it'd be done automatically whenever bundle exec rake whatever is called.
👍 love it.
I'll have a crack at it then. =) Will give me an excuse to brush up on my Ruby skills. Which're currently so rusty, I installed cargo
instead of gem
.
That might very well be the funniest thing I'll say, ever.
EDIT: For those who don't get it.
All these would output
(foo)()(bar)
, which is not what the syntax highlighting implies: