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.4.tar.gz
(24.5 kB
view details)
Built Distribution
File details
Details for the file rstcheck-6.2.4.tar.gz
.
File metadata
- Download URL: rstcheck-6.2.4.tar.gz
- Upload date:
- Size: 24.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 384942563dfbfcc85903a587ecf050447217c46b51e266ed3fe51371bc599015 |
|
MD5 | 701de886689f39903c79c4ebfcfe26f8 |
|
BLAKE2b-256 | 13fe000cc83279123cf21f68d28b8bcd76849acf8e2a9bb75cc834d4a3212a33 |
File details
Details for the file rstcheck-6.2.4-py3-none-any.whl
.
File metadata
- Download URL: rstcheck-6.2.4-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 | 23de2575ba0af1adcddea87a20d69187f0fb9dd8270f59eb98d63461c95375a7 |
|
MD5 | 37b2954bafb8672b6551eeada2fadc72 |
|
BLAKE2b-256 | 9549e55ba65b9e805cc97a1115ba51bbec346013814b6d6ded216bb4e97cf3a1 |