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 PostScript lexer #1578

Merged
merged 11 commits into from
Sep 8, 2020
Merged

Conversation

ljcooke
Copy link
Contributor

@ljcooke ljcooke commented Aug 29, 2020

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.

taasan and others added 9 commits August 29, 2020 11:20
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.
@pyrmont
Copy link
Contributor

pyrmont commented Aug 29, 2020

@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 :)

@pyrmont pyrmont added the needs-review The PR needs to be reviewed label Sep 8, 2020
@pyrmont pyrmont self-assigned this Sep 8, 2020
Copy link
Contributor

@pyrmont pyrmont left a 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 pyrmont added author-action The PR has been reviewed but action by the author is needed and removed needs-review The PR needs to be reviewed labels Sep 8, 2020
@ljcooke
Copy link
Contributor Author

ljcooke commented Sep 8, 2020

@pyrmont No worries about the delay. These changes look good to me! :)

@pyrmont pyrmont merged commit a889401 into rouge-ruby:master Sep 8, 2020
@pyrmont pyrmont removed the author-action The PR has been reviewed but action by the author is needed label Sep 8, 2020
@pyrmont
Copy link
Contributor

pyrmont commented Sep 8, 2020

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

@ljcooke ljcooke deleted the add-postscript-lexer branch September 8, 2020 06:26
mattt pushed a commit to NSHipster/rouge that referenced this pull request May 19, 2021
This commit adds a lexer for PostScript.

Co-authored-by: Trond Aasan <trond.aasan@gmail.com>
Co-authored-by: Michael Camilleri <mike@inqk.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants