鉴于以下剩余文档
.. |bar| replace:: baz
bolded? :strong:`\ |bar|\ `
bolded? **\ |bar|**
.. This one errors out
.. bolded? **\ |bar|\ **
如何创建粗体替换值?我想要
bolded? baz
这里有一个在线编辑器的链接来测试它:http://rst.ninjs.org/?n=f57ac95e1fe1643572b45d7ae8f8950c&theme=basic
最佳答案
由于 reStructuredText 不支持嵌套内联标记,因此使用样式文本创建引用的唯一方法是使用“replace”指令进行替换
http://docutils.sourceforge.net/docs/ref/rst/directives.html#replacement-text
关于python - 在内联标记内进行替换,同时转义空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33537747/