Substitution inside inline markup while escaping whitespace

梦想的初衷 提交于 2019-12-14 04:19:14

问题


Given the following reST document

.. |bar| replace:: baz

bolded? :strong:`\ |bar|\ `

bolded? **\ |bar|**

.. This one errors out
.. bolded? **\ |bar|\ **

How do I create a bolded, substituted value? I want

bolded? baz

Here's a link to the online editor to test it out: http://rst.ninjs.org/?n=f57ac95e1fe1643572b45d7ae8f8950c&theme=basic


回答1:


As reStructuredText doesn't support nested inline markup, the only way to create a reference with styled text is to use substitutions with the "replace" directive

http://docutils.sourceforge.net/docs/ref/rst/directives.html#replacement-text



来源:https://stackoverflow.com/questions/33537747/substitution-inside-inline-markup-while-escaping-whitespace

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!