Open kvark opened 6 years ago
Linguist will require a TextMate-compatible grammar for RON. I gave this a look earlier today.
I am not sure if RON is already popular enough:
In most cases we prefer that extensions be in use in hundreds of repositories before supporting them in Linguist.
https://github.com/github/linguist/blob/master/CONTRIBUTING.md#adding-an-extension-to-a-language
I found the "culprit", at least: https://github.com/github/linguist/blob/14a7cb2d1b3d6f822701bccf36666303509c7621/lib/linguist/languages.yml#L2646-L2665
Markdown:
type: prose
aliases:
- pandoc
ace_mode: markdown
codemirror_mode: gfm
codemirror_mime_type: text/x-gfm
wrap: true
extensions:
- ".md"
- ".markdown"
- ".mdown"
- ".mdwn"
- ".mkd"
- ".mkdn"
- ".mkdown"
- ".ron"
- ".workbook"
tm_scope: source.gfm
language_id: 222
GitHub's preview seems hardwired to render *.ron
as markdown: no matter how hard I try to tell Linguist otherwise.
Notably, using a file extension that isn't on that list makes it render in a monospace font (without any syntax highlighting).
I'm pretty sure the fact that you can't opt-out of the markdown presentation is a bug, or at least a valid feature request, so [I'm going to open an issue on the linguist repository].
For getting into Linguist: extension:ron NOT <data>
: 252 code results, sorting through false positives right now. Actually, I think the classification of .ron
as markdown is in error, and should be referring to .ronn
instead.
0_o the commit to add .ron
as a markdown file extension was 7 years ago (at the very beginning of the repository), and the only other time it was touched was 2 years ago when they changed from unquoted to quotes strings in the YAML.
.ron
has been markdown from the very beginning.... because from looking a bit deeper on Google, Ronn used to be Ron ages ago in rubydoc. And there's a lot more ronn than ron on GitHub today, so I think I'm going to try my luck with a PR to change that.
EDIT: PR to change the markdown extension alias .ron
to .ronn
is live. Track that for progress.
I counted, because of course I did.
48 unique repositories with Rusty Object Notation files out in the wild. 88 unique repositories helped by markdown rendering of .ron
files, 77 harmed.
Wow great work @CAD97!
Nice coordination and persistence, @CAD97 ! I'm happy to see that PR merged. It will still take time for Github to pick up the changes, and more effort to convince it to syntax highlight our syntax, but we are in a much better place for it today now, thanks to your efforts!
Note: As of two days ago, a new linguist version has been pushed out to GitHub, and .ron
files now render as plain (monospace) text! 🎉
Issue has had no activity in the last 180 days and is going to be closed in 7 days if no further activity occurs
Looks like @github-actions is a bit too eager to close this issue :grimacing:
Yeah I think it checks for comments so that's why it got closed again
Current view of a RON file in Github is rather unusable. Github uses Linguist for determining the syntax and applying the correct highlight. We should make an upstream feature to recognize RON.