twolfson / restructuredtext-lint

reStructuredText linter
The Unlicense
171 stars 20 forks source link

'caption' not recognized in code-block directive #42

Closed jpsenior closed 7 years ago

jpsenior commented 7 years ago

When using a code-block as such:

.. code-block:: text
    :caption: This is some text

     This is example text

rst-lint fails with an error: 'Error in "code-block" directive: unknown option "caption"'

Omitting the caption has no error.

twolfson commented 7 years ago

It sounds like caption isn't a built-in directive to reStructuredText and needs to be registered. Please see our "Extension" documentation for the necessary info/methods:

https://github.com/twolfson/restructuredtext-lint/tree/1.1.1#extension