Sphinx Classy Code
Drop-in replacements for Sphinx‘ code-block and literalinclude directives. In addition to specifying emphasize-lines, you can specify arbitrary classes to add on a per-line basis.
For example:
.. code-block:: python
:line-classes: 1(python-def)
def stay(classy):
pass
Will wrap the function declaration in <span class="python-def">...</span>.
Valid line + class specifiers include:
1(classname)
1-5(classname)
You can separate multiple specifiers with a comma.
You can use both line-classes and emphasize-lines in the same block.
Installation
To install, simply install the package:
$ pip install sphinx-classy-code
Then add it to the list of Sphinx extensions in your conf.py:
extensions = ['classycode']
License
sphinx-classy-code is made available under a BSD license; see LICENSE for details.
News
0.1
Release date: 16 March 2014
code-block supports line-classes option.
literalinclude supports line-classes option.
line-classes and emphasize-lines work together correctly.
Metadata
Release files for sphinx-classy-code 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sphinx-classy-code-0.1.tar.gz | 8.6 kB | Without provenance | Details for sphinx-classy-code-0.1.tar.gz |
Release files / sphinx-classy-code-0.1.tar.gz
| Download URL | sphinx-classy-code-0.1.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4a38be95fa07bb7122293982b4490375b34b1e365c8cc7951421e9967c5f053
|
|
BLAKE2b-256 checksum How to use checksums |
42a26e744da9671a5271e31e69aad8c7739983db718d09f0105da082153c0a60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for sphinx-classy-code 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.