【问题标题】:Substitution inside inline markup while escaping whitespace在转义空格时替换内联标记
【发布时间】:2016-02-05 21:15:18
【问题描述】:

给定以下 reST 文档

.. |bar| replace:: baz

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

bolded? **\ |bar|**

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

如何创建一个粗体的替代值?我想要

粗体? 巴兹

这里有一个在线编辑器的链接来测试它:http://rst.ninjs.org/?n=f57ac95e1fe1643572b45d7ae8f8950c&theme=basic

【问题讨论】:

    标签: python substitution restructuredtext


    【解决方案1】:

    由于 reStructuredText 不支持嵌套的内联标记,使用样式文本创建引用的唯一方法是使用带有“replace”指令的替换

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

    【讨论】:

      猜你喜欢
      • 2013-06-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-23
      • 2016-04-05
      • 2016-09-05
      相关资源
      最近更新 更多