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.2.0.tar.gz
(23.4 kB
view details)
Built Distribution
File details
Details for the file rstcheck-6.2.0.tar.gz
.
File metadata
- Download URL: rstcheck-6.2.0.tar.gz
- Upload date:
- Size: 23.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f47d1e136e8dc7e6fd54d9679dbc1ed7c4d87b12e17d00003fccf4734e9ffdf |
|
MD5 | d94d1f32a70da8275c7365f9fb7ce8f8 |
|
BLAKE2b-256 | 63064238192e34ae9a2991ee20ce610ab1852e4b4b6b3802234d750de56a4b81 |
File details
Details for the file rstcheck-6.2.0-py3-none-any.whl
.
File metadata
- Download URL: rstcheck-6.2.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63262c8453489a6e3873113e16c1d234c86ca90a829e685263fd6c7aec0073fa |
|
MD5 | 86b528d61bfe5df44cec64d1e9d53217 |
|
BLAKE2b-256 | d6a145a747d7a534bac89105ed2549f8addf1235c68aa2270dde54d1379407d7 |