-
Notifications
You must be signed in to change notification settings - Fork 745
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 PostScript lexer #1578
Add PostScript lexer #1578
Conversation
The `.detect?` method returned the Regexp instance instead of matching it with the input, so the result was always truthy. The pattern also had an extra '%' character at the start which failed the test.
e.g. "def" should not be highlighted in "definefont".
It's covered by the reserved keywords.
@ljcooke Thanks for this! Sorry to have been a bit quiet the past couple of weeks. Am still a bit knee deep in another project but will review this as soon as possible :) |
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 again for taking the time to submit this and sorry the review took some time :(
I know this isn't true for the existing samples but I tend to think simpler samples are better and so most of the changes I've made are in deleting redundant portions of the sample.
In addition to that, I also:
- updated the description of the lexer; and
- added aliases for the filename extensions.
Let me know what you think!
@pyrmont No worries about the delay. These changes look good to me! :) |
@ljcooke This will be part of the next release of Rouge, v3.23.0. That's actually scheduled for release later today/early tomorrow (depending on your time zone) so will be available from RubyGems pretty soon 🎉 Thanks for improving Rouge! |
This commit adds a lexer for PostScript. Co-authored-by: Trond Aasan <trond.aasan@gmail.com> Co-authored-by: Michael Camilleri <mike@inqk.net>
This adds a lexer for PostScript.
The bulk of the work was done in #1092. I've cherry-picked the changes involving PostScript, and fixed some bugs with keyword and filetype detection.