如何在Sphinx中删除没有空格的子字符串?

问题描述 投票:0回答:1

我需要删除Sphinx .rst 文件中不带空格的子字符串,以与<span style="text-decoration: line-through;">strike</span>substring

类似的方式将其转换为HTML。以下示例对我不起作用。可以吗?

conf.py

extensions = ["sphinxnotes.strike"]
索引.rst

:strike:`strike`substring
    
python python-sphinx restructuredtext strikethrough
1个回答
0
投票
这是 ReStructuredText 的一个已知特性,请参见,例如

reStructuredText 中单词的一部分加粗

您所需要的只是子字符串后面的转义空格:

:strike:`strike`\ substring
    
© www.soinside.com 2019 - 2024. All rights reserved.