Skip to content

Conversation

@ArnaudBienner
Copy link

@ArnaudBienner ArnaudBienner commented Oct 17, 2017

IMHO it would be nice to have the code snipped being colorized to (hopefully) make the code examples easier to read.
Turns out there is a Google project doing that :)
https://github.com/google/code-prettify
I've added this script + added prettyprint class to all <pre> tag so they get colorized.

Might be worth to do the same thing for <code> but IMHO it is less needed as those are smaller portion of code + not all <code> tags are cpp, so special care should be taken when specifying classes on those. So let's worry about this in a second step.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

@ArnaudBienner
Copy link
Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@shicks
Copy link
Member

shicks commented Oct 17, 2017

@tituswinters This change would need to be mirrored internally or else it will just get clobbered on the next push.

FWIW, JS and Java already both serve this same script for colorizing.

@ArnaudBienner
Copy link
Author

@shicks @tituswinters so, do you think this could be something worth to merge? Or do you have any other comments about this?

@tituswinters
Copy link
Contributor

Sorry about that - I don't monitor this repo closely since most of the traffic isn't relevant to me.

Honestly, to resolve that we're looking at moving the C++ guide out of here and into the Abseil.io repository so that changes can be noticed more easily - it'll get converted to markdown in the process. So I don't feel strongly either way.

@manshreck ?

@ArnaudBienner
Copy link
Author

@shicks @tituswinters any news about this?
I still think Google C++ styleguide is a useful resource, and would benefit from having color colorizing since it will make it easier to read (and will be consistent with other programming languages).

@ArnaudBienner
Copy link
Author

ping @pwnall since you've been active on this area recently.
I still believe this PR could be valuable.
@pwnall would you be interested in this change? I'm fine updating the merge request if that could help (though from what I understood those pages are generated automatically before being published in github).

@pwnall
Copy link
Member

pwnall commented Sep 2, 2019

@manshreck owns the decision for this. I'm fine either way, like Titus.

@vapier vapier added the lang:cpp The C++ language label Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lang:cpp The C++ language

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants