Checks syntax of reStructuredText and code blocks nested within it
Project description
General |
|
CI |
|
PyPI |
|
Github |
|
Checks syntax of reStructuredText and code blocks nested within it.
See the full documentation at read-the-docs
Installation
From pip
$ pip install rstcheck
To use pyproject.toml for configuration:
$ pip install rstcheck[toml]
To add sphinx support:
$ pip install rstcheck[sphinx]
Supported languages in code blocks
Bash
Doctest
C (C99)
C++ (C++11)
JSON
XML
Python
reStructuredText
Examples
With bad Python syntax:
====
Test
====
.. code:: python
print(
$ rstcheck bad_python.rst
bad_python.rst:7: (ERROR/3) (python) unexpected EOF while parsing
With bad C++ syntax:
====
Test
====
.. code:: cpp
int main()
{
return x;
}
$ rstcheck bad_cpp.rst
bad_cpp.rst:9: (ERROR/3) (cpp) error: 'x' was not declared in this scope
With bad syntax in the reStructuredText document itself:
====
Test
===
$ rstcheck bad_rst.rst
bad_rst.rst:1: (SEVERE/4) Title overline & underline mismatch.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rstcheck-6.0.0rc2.tar.gz
(48.2 kB
view details)
Built Distribution
File details
Details for the file rstcheck-6.0.0rc2.tar.gz
.
File metadata
- Download URL: rstcheck-6.0.0rc2.tar.gz
- Upload date:
- Size: 48.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.10 Linux/5.4.0-113-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fdbeb99246e2381eed4a51d48e21837dbeaa08e0f76aec9b61b5ffc91ddb97d |
|
MD5 | 4078fbf9adc901c1abcd517c20a3a50f |
|
BLAKE2b-256 | 1c2e74517938ec85c9bb43112fef89843c2fdd160a385f4cce08827f36289edf |
File details
Details for the file rstcheck-6.0.0rc2-py3-none-any.whl
.
File metadata
- Download URL: rstcheck-6.0.0rc2-py3-none-any.whl
- Upload date:
- Size: 26.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.10 Linux/5.4.0-113-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49c8ef64abec3bb1c19b0112696ff04cfb7093c33ad987ded5d14d0568af8758 |
|
MD5 | 0e4eb1cb10781eefa1a6bc79358dd450 |
|
BLAKE2b-256 | 51051d0c8f004a27f2bbc3b2cd3d7409226e6e51574f9dddd22d66765accc314 |