This site has the pretty source code listing.
alt text
Looking into the source code I get this HTML code.
<pre class="brush: cpp; wrap-lines: false;">
#ifndef PROGRESSSTATE_H_
#define PROGRESSSTATE_H_
class ProgressState {
...
#endif /* PROGRESSSTATE_H_ */
</pre>
It seems to me that the css does the magic. If so, what's the css should look like for having the source code listing? If not, what's the way to have the source code in HTML?
1 Answer 1
It is probably using a javascript highlighting library such as syntaxhighlighter.
The javascript will pick up the CSS class name and use the brush value to highlight the contents of the <pre> tag the way you see it.
It is done with lots of changes to the DOM - additional divs and spans with specific styles.