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 lexer for Cython support #1287

Merged
merged 12 commits into from
Aug 4, 2019
Merged

Conversation

mwaddoups
Copy link
Contributor

Since Gitlab uses this lexer, I wanted to implement cython support. However, this is pretty much the first code I've written in Ruby.

I lent heavily on the Pygments implementation (https://bitbucket.org/birkenfeld/pygments-main/src/0bcf355df9fbe55d3753256c01260f48fa01e794/pygments/lexers/python.py?at=default&fileviewer=file-view-default#python.py-570) as suggested in the issue #1101

From what I can tell it passes tests, and a look at the rackup output seems to produce the right results for highlighting on the test file I used.

Let me know if this works and what needs to change.

@pyrmont pyrmont added the needs-review The PR needs to be reviewed label Jul 29, 2019
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.

This looks good! Just a couple of minor things:

lib/rouge/lexers/cython.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/cython.rb Show resolved Hide resolved
lib/rouge/lexers/cython.rb Outdated Show resolved Hide resolved
@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 Jul 29, 2019
@pyrmont pyrmont added needs-review The PR needs to be reviewed and removed author-action The PR has been reviewed but action by the author is needed labels Jul 30, 2019
@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 Aug 2, 2019
@pyrmont pyrmont merged commit d4e52dd into rouge-ruby:master Aug 4, 2019
@pyrmont pyrmont removed the author-action The PR has been reviewed but action by the author is needed label Aug 4, 2019
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.

2 participants