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

Can we not use text syntax highlighting for code blocks as much? Or can text get a gray background in the rendered HTML too? #139

Closed
carols10cents opened this issue Jul 21, 2016 · 2 comments
Assignees

Comments

@carols10cents
Copy link
Member

@steveklabnik I'm reading through your Vec PR and noticed you chose to use text as the syntax highlighting choice for many of the code blocks (I'm working on comments about the actual contents of the chapter but thought I'd open a new issue for this since it's orthogonal).

I don't know how code blocks are going to end up looking in print, but I really like the gray background that sets code/pseudocode/output apart from the prose in the rendered HTML.

I've been making error messages and output from running commands have bash as their type, since that gets the gray box. Can we make that a convention?

I get that the parts of the Vec chapter that show the approximate internal structure of Vecs are pseudocode and not valid rust, but would it hurt to have them marked as rust,ignore?

If you like them as text, can we change the CSS to make them have a gray background too pretty please? 🍨 🍒 :)

Assigning to @steveklabnik because I want his thoughts, STEVE DO NOT DO THE WORK FOR THIS ONCE WE DECIDE ON SOMETHING I'LL TAKE CARE OF IT ❤️ ❤️ ❤️ ❤️

@steveklabnik
Copy link
Member

I've been making error messages and output from running commands have bash as their type, since that gets the gray box. Can we make that a convention?

Sure!

I get that the parts of the Vec chapter that show the approximate internal structure of Vecs are pseudocode and not valid rust, but would it hurt to have them marked as rust,ignore?

I was worried that the highlighting would screw up and it would look worse, but didn't check it.

@carols10cents
Copy link
Member Author

Ok! between #203 and 11cb24b, I think we've got all current terminal output using bash syntax highlighting. I'm going to try and keep an eye on this as we add more content, and I've put it in the style guide i'm working on adding and I'm planning on checking through all of those things as we freeze chapters for print.

elahn pushed a commit to elahn/rust-book that referenced this issue Aug 20, 2016
AbrarNitk pushed a commit to FifthTry/rust-book that referenced this issue Jun 2, 2021
AbrarNitk pushed a commit to FifthTry/rust-book that referenced this issue Jun 2, 2021
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

No branches or pull requests

2 participants