Skip to main content

Pygments Lexers for django-components

Project description

pygments-djc

PyPI - Version PyPI - Python Version PyPI - License PyPI - Downloads GitHub Actions Workflow Status

Pygments Lexers for django-components.

Installation

  1. Install the package:

    pip install pygments-djc
    
  2. Add the lexers to your Pygments configuration by simply importing pygments_djc

    import pygments_djc
    

Lexers

DjangoComponentsPythonLexer

Code blocks: djc_py / djc_python

This is the same as Python3 Lexer, but also highlights nested JS / CSS / HTML code blocks within Component classes:

class MyComponent(Component):
    template = """
      <div>Hello World</div>
    """

The syntax highlight then looks like this:

Django Components Python Lexer Example

Release notes

Read the Release Notes to see the latest features and fixes.

Development

Tests

To run tests, use:

pytest

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

pygments_djc-1.0.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygments_djc-1.0.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file pygments_djc-1.0.1.tar.gz.

File metadata

  • Download URL: pygments_djc-1.0.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pygments_djc-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6adf7f965bf78abc2a9101d037dee36aabce9b0a01250e7ad834b3aafb9c05da
MD5 b35c9155920bbdb797c37351b2b81762
BLAKE2b-256 b4f1f41333ce2761a21afcd1952e7e842e182b1aebb1e71e40786541ac8e0347

See more details on using hashes here.

File details

Details for the file pygments_djc-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pygments_djc-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pygments_djc-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b797f07788200fc9fce9d363b9496a78fca71b5efa71057baa59a02df93bf190
MD5 bee911f09f5d36001852f76f6ed08338
BLAKE2b-256 8e5b8c790e7c3fc9c0af85f76650fb65af29e4d66bd17eff183f526c3cf5ab4d

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