如何转义 .rst 文件中的“`”反引号字符?

Pie*_*aud 6 restructuredtext escaping backticks python-sphinx

我想写下下面这句话:

Don't forget to escape the :code:`\`` character, it will be interpreted as code mark
Run Code Online (Sandbox Code Playgroud)

但我不知道如何转义“ `”反引号字符。有可能吗?

Ste*_*rcy 5

您无法在解释文本中转义反引号,因为反引号本身定义了解释的内容。

至少有两个选择。后者产生的结果与您使用:code:转义反引号进行编码时的结果相同。

无格式

Don't forget to escape the \` character, it will be interpreted as code mark
Run Code Online (Sandbox Code Playgroud)

带格式化

.. |bt| raw:: html

    <code class="code docutils literal notranslate">`</code>

Don't forget to escape the |bt| character, it will be interpreted as code mark
Run Code Online (Sandbox Code Playgroud)

上面的例子呈现

渲染示例