I\'ve been documenting a software package using Sphinx and reStructuredText.
Within my documents, there are some long code snippets. I want to be able to have them
You can use the built-in HTML collapsible details tag by wrapping the code in two raw HTML directives
.. raw:: html big code .. code-block:: python lots_of_code = "this text block" .. raw:: html
Produces:
big code lots_of_code = "this text block"
lots_of_code = "this text block"