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

Console lexer: use whitespace after prompt #894

Merged
merged 1 commit into from
Aug 5, 2019
Merged

Console lexer: use whitespace after prompt #894

merged 1 commit into from
Aug 5, 2019

Conversation

alexanderweiss
Copy link
Contributor

Changed the console lexer to use the whitespace token after the prompt instead of using a normal text token. This is useful to allow applying custom CSS to the whitespace (e.g. disabling selection).

Input:

~$ gpg2 

Original output:

<span class="gp">~$</span> gpg2 

New output:

<span class="gp">~$</span><span class="w"> </span>gpg2 

@pyrmont
Copy link
Contributor

pyrmont commented Jul 17, 2019

@jneen I'm not very familiar with the console lexer and so wanted to pick your brain a little. In a previous PR, you mentioned that using the Text::Whitespace token will produce a separate container (a fact that this PR takes advantage of). I assume that's not problematic but would appreciate if you could confirm?

@pyrmont
Copy link
Contributor

pyrmont commented Aug 5, 2019

Having spent a bit more time looking at this now, the change makes sense to me :)

@pyrmont pyrmont removed the maintainer-action The PR has been reviewed but action by a maintainer is required label Aug 5, 2019
@pyrmont pyrmont merged commit 96efe28 into rouge-ruby:master Aug 5, 2019
@alexanderweiss
Copy link
Contributor Author

Great! Thanks for picking up maintenance!

@pyrmont
Copy link
Contributor

pyrmont commented Aug 5, 2019

@alexanderweiss Thanks for the submission and I'm sorry it's taken so long to get to this >_< We're updating Rouge on a two-week basis at the moment and the next release, v3.8.0, is planned for Tuesday. This will go out as part of that. Thanks again!

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