A Sphinx extension which trims redundant blanks
Project description
A Sphinx extension, which trims redundant blanks generated due to line breaks or inline-markups from generated documents.
Install
Use pip:
pip install sphinxcontrib-trimblank
Usage
Only add ‘sphinxcontrib.trimblank’ to extensions option in conf.py:
extensions += ['sphinxcontrib.trimblank']
If you want to change the extension behaviour, configure options in conf.py:
# Keep blanks to adjacent to ascii characters in html documents
trimblank_keep_alnum_blank = ['html', 'singlehtml']
All options are listed in Configuration.
Configuration
option name |
meaning |
default |
---|---|---|
trimblank_enabled |
A list of builder names (‘html’, ‘singlehtml’, ‘latex’, and so on). Only when the builder in the list is used, sphinxcontrib-trimblank will trim blanks. The value may also be a boolean. Then the extension will do, or not do for any builder. |
True |
trimblank_keep_alnum_blank |
A list of builder names (‘html’, ‘singlehtml’, ‘latex’, and so on). Only when the builder in the list is used, sphinxcontrib-trimblank will keep blanks adjacent to an ascii character. The value may also be a boolean. Then the extension will do, or not do for any builder. |
False |
trimblank_debug |
If this value is True, the trimmed texts are output as building messages. |
False |
Licence
MIT Licence
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
Built Distribution
Hashes for sphinxcontrib-trimblank-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bfe7657cb763819c664550abb000601b417fcd068c03ca45e84b946dbbbf401 |
|
MD5 | 4dfbea1f92a042c8912e06e7ec7c8a40 |
|
BLAKE2b-256 | 699961d5958402ba89ab0865992b3f94a51a8b2a4a4479a71fb91db4fd446925 |
Hashes for sphinxcontrib_trimblank-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2786fabd13f07d229c2aee683290a350e459dd320f2e1155cd39be06ada1a343 |
|
MD5 | 2fa731ba82ae138d79929e67d1d9422e |
|
BLAKE2b-256 | 695c8c184b6ed3866b84991b040d625ad230c3ce3425b0f306f425f59ae3b86a |