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.3.tar.gz
(24.4 kB
view details)
Built Distribution
File details
Details for the file rstcheck-6.2.3.tar.gz
.
File metadata
- Download URL: rstcheck-6.2.3.tar.gz
- Upload date:
- Size: 24.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57678a787e8ea8e15abe5675e72cfbc940a55d0dd2cc1e069db73ab8467d7621 |
|
MD5 | 8521e3a84c7d63d85800594394c66d6b |
|
BLAKE2b-256 | dd43305b5415cdf2c1b3d1be7364bba2d63a7c6277ae2d54fc660204db2cf310 |
File details
Details for the file rstcheck-6.2.3-py3-none-any.whl
.
File metadata
- Download URL: rstcheck-6.2.3-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a82c7ca198343febe0a12f3168ecef28593e5980323799355ba9de585d0c367a |
|
MD5 | 34a6296bdbf1e6a1122f6ede5670aa65 |
|
BLAKE2b-256 | a57df65d5b476377f586a317dad2cf1c6ec4a35f7133e5f0451596462c13cf71 |