【发布时间】:2017-01-05 02:27:49
【问题描述】:
我的项目使用了相当多的替换 (.. |apipath| replace:: http://domain/api/v1),我希望能够在内联文字块中使用此替换。我想要类似以下 rST 源代码:
请求网址:``|apipath|/endpoint/method/param``
变成下面的html输出:
请求网址:http://domain/api/v1/endpoint/method/param
相反,它输出为
请求网址:|apipath|/endpoint/method/param
你知道有什么方法可以让它工作吗?
我尝试过使用自定义角色和类。我知道parsed-literal 指令可用,但这似乎只创建块内容,而不是内联。
【问题讨论】:
标签: python-sphinx substitution restructuredtext