Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adding UO Razor Script to available languages #3309

Merged
merged 8 commits into from
Jan 28, 2022

Conversation

jaseowns
Copy link
Contributor

I play Ultima Online and we use a program called Razor to help script and hotkey certain actions. I'm making a website related to these scripts and would love to be able to use the react-syntax-highlighter importing this language file from Prism.

This is my first time submitting anything like this to open source so let me know if I need to change anything!

Thanks,
Jaseowns

@github-actions
Copy link

github-actions bot commented Jan 25, 2022

JS File Size Changes (gzipped)

A total of 2 files have changed, with a combined diff of +1.22 KB (+48.2%).

file master pull size diff % diff
components/prism-uorazor.min.js 0 Bytes 1.21 KB +1.21 KB +100.0%
plugins/show-language/prism-show-language.min.js 2.54 KB 2.55 KB +10 B +0.4%

Generated by 🚫 dangerJS against b787606

Copy link
Member

@RunDevelopment RunDevelopment left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR @jaseowns!

I left you a few comments.

Regarding the order of tokens: Prism supports greedy tokens. Strings and comments are typically greedy, so e.g. " // foo " is a string and // " foo " is a comment despite both containing the syntax of the other. Please make all comment and string greedy (greedy: true).
Also, please move all (the new) greedy tokens to the top of the grammar. This doesn't change the language, but it makes it faster.

@RunDevelopment RunDevelopment merged commit 3f8cc5a into PrismJS:master Jan 28, 2022
@RunDevelopment
Copy link
Member

Thank you for contributing @jaseowns!

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

Successfully merging this pull request may close these issues.

2 participants