Reputation: 774
I need to strike substrings without spaces in Sphinx .rst file to transform it to HTML in a similar manner as <span style="text-decoration: line-through;">strike</span>substring
. The following example is not working for me. Is it possible?
conf.py
extensions = ["sphinxnotes.strike"]
index.rst
:strike:`strike`substring
Upvotes: 1
Views: 180
Reputation: 929
There is also the Docutils configuration setting character-level-inline-markup that lifts the no-whitespace-restriction around inline markup strings.
It could be set in a docutils.conf
configuration file in the same directory as setpu.py
.
However, I would not recommend this for a complete Sphinx project --- you may need to escape a lot of "false positives". Exception: it may make sense in projects using a language without inter-word spaces.
Upvotes: 1
Reputation: 1996
It's a known peculiarity of ReStructuredText, see, e.g., Part of a word bold in reStructuredText.
All you need is an escaped space after the substring:
:strike:`strike`\ substring
Upvotes: 3