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.1.1.tar.gz
(17.5 kB
view details)
Built Distribution
File details
Details for the file rstcheck-6.1.1.tar.gz
.
File metadata
- Download URL: rstcheck-6.1.1.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.8.10 Linux/5.4.0-131-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e43485a644e794b8127f8c4868ef62c14ec7919bdda6cb16642157055d32e47 |
|
MD5 | 603fe38fa23dccd6e5ea4b44e2f61cb1 |
|
BLAKE2b-256 | 5dcdb86de2a72838f755ae7b23acce9630013686a01c27e6e77f89881fdbf98a |
File details
Details for the file rstcheck-6.1.1-py3-none-any.whl
.
File metadata
- Download URL: rstcheck-6.1.1-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.8.10 Linux/5.4.0-131-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | edeff9ad0644d12bd250100b677887424193789254c90d95c13375062ee2cbac |
|
MD5 | 2f4b764607ec5952e7da434e25c91e5d |
|
BLAKE2b-256 | 21c11ef853f0bc58a0e1c2743818662ebb84ccdc56ac078bc222ee61fc711171 |