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

Rust: fix "await" highlight #1587

Merged
merged 1 commit into from
Oct 13, 2020
Merged

Conversation

nsfisis
Copy link
Contributor

@nsfisis nsfisis commented Sep 21, 2020

Description

await is, currently, highlighted as Name::Property. It should be highlighted as Keyword as well as async.

Screenshot

The source code below is borrowed from Rust's visual test (spec/visual/samples/rust).

Before

Thankful-eyes theme:

image

GitHub theme:

image

Because GitHub theme and some other themes don't highlight "Name::Property" segments, await is displayed as normal text.

After

Thankful-eyes theme:

image

GitHub theme:

image

"await" is, currently, highlighted as "Name::Property". It should be
highlighted as "Keyword" as well as "async".
Copy link
Member

@jneen jneen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much better this way. +1 from me.

Copy link
Contributor

@hugopeixoto hugopeixoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does look better. I tried this locally, it works!

@pyrmont pyrmont merged commit da6d96c into rouge-ruby:master Oct 13, 2020
@pyrmont
Copy link
Contributor

pyrmont commented Oct 13, 2020

@nsfisis Thanks for this! I've merged it into master and it will be part of the v3.24.0 release that's pushed out tonight/tomorrow (depending on your time zone) 🎉

mattt pushed a commit to NSHipster/rouge that referenced this pull request May 19, 2021
Currently, `await` is tokenised as `Name::Property`. It should be tokenised as
`Keyword` in the same way as `async` is tokenised. This commit fixes that
mistake.
@nsfisis nsfisis deleted the bugfix.rust-await branch April 3, 2023 12:40
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.

None yet

4 participants