-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Correct misclassification of .js.erb files #4427
Conversation
Previously JavaScript files containing embedded Ruby, for example files used to render JavaScript for client-side execution in response to an AJAX request in a Rails application, were misclassified as HTML+ERB. This commit corrects this by classifying such source files as JavaScript+ERB and grouping under the parent JavaScript language. Signed-off-by: Charlie Jonas <charlie@charliejonas.co.uk>
This pull request has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this pull request was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request and sorry for the delay in reviewing!
I left two comments related to syntax highlighting below.
For other reviewers: I think there is a large enough corpus of these files on GitHub to mandate support: extension:erb filename:js
.
Thanks for the comments @pchaigno! Syntax highlighting updated now to use JavaScript now. I wasn't sure whether |
The |
I was considering that, but I think(?) listing separately does allow some benefits eg. when searching you can restrict the scope to JavaScript+ERB as opposed to all JavaScript, such as this example with HTML+ERB. |
This pull request has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this pull request was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions. |
Did you have any thoughts on the above RE: whether to keep the |
This pull request has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this pull request was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions. |
Change the language classification of
*.js.erb
files from HTML+ERB to JavaScript+ERB. I think I've covered all the relevant bases but let me know if there's something I can correct - thanks for taking the time to review! 😄Description
Previously JavaScript files containing embedded Ruby syntax were misclassified as HTML+ERB. This PR would correct this by classifying such source code files as JavaScript+ERB and grouping under the parent JavaScript language.
Motivation for this is that JavaScript files meant for client-side execution in response to an AJAX request in a Rails application are listed under HTML when running
github-linguist --breakdown
.Checklist: