Skip to main content

Jinja2 extension to highlight source code using Pygments

Project description

* jinja2-highlight *

About:

A simple Jinja2 template engine extension that uses Pygments to highlight code blocks.

Source:

Github: https://github.com/tlatsas/jinja2-highlight

Pypi: http://pypi.python.org/pypi/jinja2-highlight/

Requirements:

  • Jinja2 >= 2.4

  • Pygments >= 1.5

Highlight statement:

{% highlight ‘language’ %} code-goes-here {% endhighlight %}

Replace language with the appropriate Pygments lexer short name: http://pygments.org/docs/lexers/

Using with Flask framework:

See example at: https://github.com/tlatsas/jinja2-highlight/tree/master/examples/flask

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jinja2-highlight-0.4.0.tar.gz (2.2 kB view details)

Uploaded Source

File details

Details for the file jinja2-highlight-0.4.0.tar.gz.

File metadata

File hashes

Hashes for jinja2-highlight-0.4.0.tar.gz
Algorithm Hash digest
SHA256 8f47dd079c1459a534c1a1b528b4eb4e0fa75f53961bcec23bf48cf21963c13f
MD5 c4dc2f4d1a2e27505fefb8186652163c
BLAKE2b-256 3436fb3beb4653a08178c6bd261bd9a8f867dc042a60c5fede55a70cd04d1b91

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page