Re: Is there a plan to integrate fenced code blocks in rst?

Marcelo Huerta <[email protected]> Sun, 6 Dec 2020 17:28:00 -0300
Newsgroups gmane.text.docutils.user
Message-ID <CAB_OKS=HUvw7PZf8b7iTsei94aehwk35=Kx7OM8z2UY+cB4WMQ@mail.gmail.com>
El dom, 6 dic 2020 a las 17:02, Gökçe Aydos (<[email protected]>)
escribió:


> My case is different. For example in one document I have about 50 code
> blocks, which are about 2 to 8 lines long. Creating 50 files for this
> purpose would be very inconvenient.
>

You don't need to do that. The include directive accepts the "start-line"
and "end-line" parameters which allow you to take information from a
separate file. Also, if you edit the file frequently, you can add delimiter
comments to the sections of code and use the :start-after: and :end-before:
parameters.