gpt4 book ai didi

python - Sphinx 代码块中的替换不会被替换

转载 作者:IT老高 更新时间:2023-10-28 22:09:23 25 4
gpt4 key购买 nike

在这个由 Sphinx 渲染的 reST 示例中,|yaco_url|不会被替换,因为它在代码块中:

.. |yaco_url| replace:: http://yaco.es/

You can use wget to download it:

.. code-block:: console

$ wget |yaco_url|package.tar.gz

不知道有没有办法强制替换|yaco_url|在渲染代码块之前。

最佳答案

使用“parsed-literal”指令。

.. parsed-literal::

./home/user/somecommand-|version|

来源:https://groups.google.com/forum/?fromgroups=#!topic/sphinx-dev/ABzaUiCfO_8 :

关于python - Sphinx 代码块中的替换不会被替换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8821511/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com