sphinx-doc/sphinx

testcode directives should support the same options as code-block

Open

#6858 aperta il 23 nov 2019

Vedi su GitHub
 (2 commenti) (3 reazioni) (0 assegnatari)Python (1985 fork)batch import
extensionshelp wantedtype:enhancement

Metriche repository

Star
 (5625 star)
Metriche merge PR
 (Merge medio 10g 11h) (11 PR mergiate in 30 g)

Descrizione

It's relatively easy to switch .. code-block:: directives out for .. testcode:: directives to make sure that documentation is up-to-date with respect to an implementation, which is great.

However, code blocks support several nice options that testcode blocks don't, making it impossible to substitute them 1-for-1 in all situations. For example, options like :caption: and :name: seem both very useful and like they should hopefully be easy to support, and the closer to parity the two directives are, the easier it will be to switch between them as desired.

Guida contributor