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

Adding UO Razor Script to available languages #3309

Merged
merged 8 commits into from Jan 28, 2022

Conversation

jaseowns
Copy link
Contributor

@jaseowns jaseowns commented Jan 25, 2022

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 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

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.

components/prism-uorazor.js Outdated Show resolved Hide resolved
components/prism-uorazor.js Outdated Show resolved Hide resolved
components/prism-uorazor.js Outdated Show resolved Hide resolved
@jaseowns jaseowns requested a review from RunDevelopment Jan 26, 2022
components/prism-uorazor.js Outdated Show resolved Hide resolved
@jaseowns jaseowns requested a review from RunDevelopment Jan 28, 2022
@RunDevelopment RunDevelopment merged commit 3f8cc5a into PrismJS:master Jan 28, 2022
12 checks passed
@RunDevelopment
Copy link
Member

@RunDevelopment RunDevelopment commented Jan 28, 2022

Thank you for contributing @jaseowns!

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.

None yet

2 participants