Code syntax highlighting templatetag
Replaces <code> blocks with syntax highlighted code. Use CSS to actually get the colours you want, look at pygments documentation for extracting css for various styles. This snippet has the advantage of falling back on <pre> if anything goes wrong, and attempting to guess the syntax of code, falling back on python.
- templatetag
- pygments
- highlighting
- beautifulsoup
- templatetags
- syntax
- syntax-highlightin