.. 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:
You can separate multiple specifiers with a comma.
You can use both line-classes and emphasize-lines in the same block.
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']
sphinx-classy-code is made available under a BSD license; see LICENSE for details.
Release date: 16 March 2014
- code-block supports line-classes option.
- literalinclude supports line-classes option.
- line-classes and emphasize-lines work together correctly.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size sphinx-classy-code-0.1.tar.gz (8.6 kB)||File type Source||Python version None||Upload date||Hashes View|