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

irb lexer: recognize the SIMPLE prompt #1943

Merged
merged 2 commits into from
Jun 11, 2023
Merged

Conversation

r3trofitted
Copy link
Contributor

I'm used to IRB's "simple" prompt (>>), and found out while writing documentation that Rouge didn't support it yet. So this PR basically adds it. Cheers!

Added support for IRB's `:SIMPLE` prompt (`>>`), plus some tests
for it and the two other supported prompts (IRB's `:STANDARD` and Pry's
default).
@tancnle tancnle self-assigned this Apr 30, 2023
@tancnle tancnle added the needs-review The PR needs to be reviewed label Apr 30, 2023
Copy link
Collaborator

@tancnle tancnle 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 your contribution @r3trofitted ❤️. I have added a suggestion for your consideration. Please let me know what you think 🙏🏼.

lib/rouge/lexers/irb.rb Outdated Show resolved Hide resolved
@tancnle tancnle added the author-action The PR has been reviewed but action by the author is needed label Jun 4, 2023
Avoid picking output as prompt

+ support for multi-line prompts. Courtesy of @tancnle.

Co-authored-by: Tan Le <numbat@fastmail.com>
@tancnle tancnle added this pull request to the merge queue Jun 11, 2023
Merged via the queue into rouge-ruby:master with commit a5c5f1b Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author-action The PR has been reviewed but action by the author is needed needs-review The PR needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants