Pygments Lexers for django-components.
-
Install the package:
pip install pygments-djc
-
Add the lexers to your Pygments configuration by simply importing
pygments_djc
import pygments_djc
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:
Read the Release Notes to see the latest features and fixes.
To run tests, use:
pytest