Skip to content

fixes missing rust syntax highlighting in example #16280

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

Closed
wants to merge 1 commit into from

Conversation

cburgdorf
Copy link
Contributor

No description provided.

@alexcrichton
Copy link
Member

The default for syntax highlighting is to be rust (if not annotated), and this appears to be annotated in the rendered version, did this fix something for you?

@cburgdorf
Copy link
Contributor Author

Yes, it fixes the missing syntax highlighting.

Compare this:

image

with this:
bildschirmfoto 2014-08-05 um 22 38 44

But wait a second before merging. There is at least one more. I'll force push the branch in a moment.

@steveklabnik
Copy link
Member

I think this might be a GitHub vs. Rustdoc thing.

I do like explicitly annotating all of them, even if they don't need it, because of it.

@lilyball
Copy link
Contributor

lilyball commented Aug 5, 2014

It's definitely a GitHub vs Rustdoc thing. GitHub doesn't automatically assume rust as the language. Rustdoc does.

@cburgdorf
Copy link
Contributor Author

Actually there is quite some mix of _, _rust, {rust}_, _{rust, ignore}, and several others. I'm not exactly sure when to use which but at least this patch brings missing syntax highlighting on github for a couple of code examples.

@lilyball
Copy link
Contributor

lilyball commented Aug 5, 2014

I don't see why we should care about the highlighting of the markdown files on GitHub. That's not how they're intended to be viewed.

@steveklabnik
Copy link
Member

Nothing is equivalent to rust, but I like including the parens if you're going to bother to put it in.

@@ -1507,7 +1507,7 @@ a full line of input. Nice and easy.

Do you remember this code?

```
```{rust,ignore}
Copy link
Member

Choose a reason for hiding this comment

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

Why is this one now ignore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At the time that I added it, I didn't actually know what the purpose of ignore is and just noticed that it is sometimes {rust,ignore} instead of just rust. Now I know that this means it will be ignored for the tests. Should I change that back to just {rust}?

Copy link
Member

Choose a reason for hiding this comment

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

Yes please!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated and rebased on latest master

@steveklabnik
Copy link
Member

r+=me after the ignore question is resolved.

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.

5 participants