Checks syntax of reStructuredText and code blocks nested within it
Project description
General |
|
PyPI |
|
Github |
|
Checks syntax of reStructuredText and code blocks nested within it.
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.0rc1.tar.gz
(44.5 kB
view details)
Built Distribution
File details
Details for the file rstcheck-6.0.0rc1.tar.gz
.
File metadata
- Download URL: rstcheck-6.0.0rc1.tar.gz
- Upload date:
- Size: 44.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.10 Linux/5.4.0-110-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ff85c55ca76d4859b21fd8e59896072127efa30fbd6a7bda885844a6b709156 |
|
MD5 | 332c8923eaad5d83700e49640dc5141f |
|
BLAKE2b-256 | 3fe1ec03f8b8eea1df76a77e91bfde26b5cd90c9d3dd6951c2bcc47cc9557a93 |
File details
Details for the file rstcheck-6.0.0rc1-py3-none-any.whl
.
File metadata
- Download URL: rstcheck-6.0.0rc1-py3-none-any.whl
- Upload date:
- Size: 24.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.10 Linux/5.4.0-110-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 912546dd37cd485724d8dfa29c90044de6f72c9f75e8b1d0d33600e102f695d9 |
|
MD5 | 55183d4f557389ac2cb78764d5c8efde |
|
BLAKE2b-256 | e9cc37e62179b852802ec07c58ad0d54ccaea1334d6700190246007374643c27 |