python code highlighter for publishing in html
I'm looking for a开发者_如何学Go python code highlighter for publishing as html. I've found this site http://quickhighlighter.com that does highlighting really well. However if I try to copy/paste some python code from it to a text file, I get a mess. If you know a better tool, please let me know.
Thanks in advance.
pygmentize
, which handles a lot more languages than just Python and a lot more formats than just HTML.
Don't get messed up with http://quickhighlighter.com I've used this too But I would suggest http://hilite.me/
If you are looking to highlight the code which is in your <code>
or <pre>
block you can use https://code.google.com/p/google-code-prettify/ This works well and has a lot of themes.
This prettifier looks for the code block with class "prettyprint" and highlights the code.
精彩评论