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

Fix rustdoc highlighting of & and * #38569

Merged
merged 1 commit into from
Jan 12, 2017

Conversation

chris-morgan
Copy link
Member

Whitespace tokens were included, so the span check used with & was incorrect, and it was never highlighted as kw-2 (RefKeyword).

The * in *foo and *const T should also be highlighted kw-2, so I added them. Note that this will cause mishighlighting of code like 1*2, but that should have been written 1 * 2. Same deal with 1&2.

Whitespace tokens were included, so the span check used with `&` was
incorrect, and it was never highlighted as kw-2.

The `*` in `*foo` and `*const T` should also be highlighted kw-2, so I
added them. Note that this *will* cause mishighlighting of code like
`1*2`, but that should have been written `1 * 2`. Same deal with `1&2`.
@rust-highfive
Copy link
Collaborator

r? @steveklabnik

(rust_highfive has picked a reviewer for you, use r? to override)

@steveklabnik
Copy link
Member

Note that this will cause mishighlighting of code like 1*2, but that should have been written 1 * 2. Same deal with 1&2.

I'm okay with this.

@bors: r+

thank you!

@GuillaumeGomez
Copy link
Member

We'll need to be careful about this but otherwise, good job!

@jseyfried
Copy link
Contributor

@bors r=steveklabnik

@bors
Copy link
Contributor

bors commented Jan 12, 2017

📌 Commit c9a6e87 has been approved by steveklabnik

@bors
Copy link
Contributor

bors commented Jan 12, 2017

⌛ Testing commit c9a6e87 with merge c6f9d55...

@bors
Copy link
Contributor

bors commented Jan 12, 2017

💔 Test failed - status-travis

@alexcrichton
Copy link
Member

alexcrichton commented Jan 12, 2017 via email

@bors
Copy link
Contributor

bors commented Jan 12, 2017

⌛ Testing commit c9a6e87 with merge 27b9e6d...

bors added a commit that referenced this pull request Jan 12, 2017
…abnik

Fix rustdoc highlighting of `&` and `*`

Whitespace tokens were included, so the span check used with `&` was incorrect, and it was never highlighted as kw-2 (RefKeyword).

The `*` in `*foo` and `*const T` should also be highlighted kw-2, so I added them. Note that this *will* cause mishighlighting of code like `1*2`, but that should have been written `1 * 2`. Same deal with `1&2`.
@bors
Copy link
Contributor

bors commented Jan 12, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: steveklabnik
Pushing 27b9e6d to master...

@bors bors merged commit c9a6e87 into rust-lang:master Jan 12, 2017
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.

7 participants