2

Is there a way to do a replacement or variable substitution with replace in reStructuredText inside of a code-block?

For example, in

.. code-block:: sh

    $ |script| args moreargs
    Some output

    $ another_script args moreargs
    Some more output

using

.. |script| replace:: some_script

displays as

$ |script| args moreargs
Some output

$ another_script args moreargs
Some more output

and not

$ some_script args moreargs
Some output

$ another_script args moreargs
Some more output

I know that I can use parsed-literal, but that looses syntax coloring.

Community
  • 1
  • 1
orome
  • 45,163
  • 57
  • 202
  • 418

0 Answers0