在转义空格时替换内联标记 [英] Substitution inside inline markup while escaping whitespace

查看:54
本文介绍了在转义空格时替换内联标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给定以下 reST 文档

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

粗体?baz

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

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

推荐答案

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

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

这篇关于在转义空格时替换内联标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆