2

Which library does GitHub use to beautify JavaScript code?

I am looking for a good code prettify library.

Leif Wickland
  • 3,693
  • 26
  • 43
guilin 桂林
  • 17,050
  • 29
  • 92
  • 146

2 Answers2

2

http://help.github.com/troubleshooting-common-issues/

We use the excellent pygments library for our syntax highlighting. Check their list of supported languages and learn how to specify a lexer for yours. If you contribute a lexer back to pygments, let us know and we’ll make sure it’s made available here on GitHub.

user247702
  • 23,641
  • 15
  • 110
  • 157
  • thanks. what do you think about server side rendering and client side rendering, for me, server side rendering maybe a little bit expensive. – guilin 桂林 May 25 '11 at 11:25
1

Github do not appear to use any client side library to render code. You can see, using something like Chrome's Net tab, that the HTML views of code arrive from the server prewrapped with vast numbers of span elements.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335