我可以在reStructuredText代码块中替换吗?

时间:2015-11-14 19:23:15

标签: substitution restructuredtext

有没有办法在replace内的reStructuredText中使用code-block进行替换或变量替换?

例如,在

.. code-block:: sh

    $ |script| args moreargs
    Some output

    $ another_script args moreargs
    Some more output
使用

.. |script| replace:: some_script

显示为

$ |script| args moreargs
Some output

$ another_script args moreargs
Some more output

而不是

$ some_script args moreargs
Some output

$ another_script args moreargs
Some more output

我知道我可以使用parsed-literal,但这会丢失语法着色。

0 个答案:

没有答案
相关问题