Skip to content
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

Add include/extend/prepend to Ruby keywords #2092

Closed
wants to merge 2 commits into from

Conversation

janko
Copy link

@janko janko commented Oct 17, 2019

In Ruby, include, extend and prepend are treated as keywords (e.g. GitHub's syntax highlighter has that behaviour), so I thought it would be nice if Prism did this as well.

By the way, I'm generally impressed with Prism's Ruby tokenization, especially coming from highlight.js.

@RunDevelopment
Copy link
Member

Thank you for submitting this PR!

Please run gulp to generate the minified files and please add the new keywords to Ruby's keyword test.

@RunDevelopment
Copy link
Member

Ooof. Seems like npm installed a more recent version of UglifyJS for you.
Could you please tell me which version because npm only installs v3.5.2 for me. You can check by opening path/to/prims/node_modules/uglify-js/package.json. At the end of the file, there will a version property.

@mAAdhaTTah
Copy link
Member

@RunDevelopment npm ls uglify-js would be easier.

@janko Use npm ci to make sure you get the exact versions in the lockfile.

@janko
Copy link
Author

janko commented Oct 19, 2019

Thanks for the instructions. I've actually switched to Atom's highlights package, which uses the "official" Ruby grammar (it's used by GitHub, Atom and VSCode). This grammar is more robust and highlights all Ruby code correctly for me, and is up-to-date with these new keywords.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants