Re: strikeout and hyperlinks

David Goodger <[email protected]>
Newsgroups gmane.text.docutils.user
Message-ID <CABiJP=+uN0E11iVTxZXt5Da5xbGKX8LcFcbsDeTe7yd40-76gg@mail.gmail.com>
On Fri, Dec 23, 2016 at 3:30 AM, Gour <[email protected]> wrote:
> I've a need for strikeout text in some of my blog posts that I migrate to
> Nikola static-site-generator using rst markup...
>
> I've the following in my post:
>
> +---------------------+
> .. role:: strike
>     :class: strike
>
> Here are few things to do:
>
> - :strike:`point which is already done in our `archive
>   <http://www.example.com/archive/>` which contains mp3 files`

There is a workaround to reST limitation regarding nested inline
markup that allows you to style a hyperlink reference, described here:
http://docutils.sourceforge.net/FAQ.html#is-nested-inline-markup-possible.

This is how you'd do the example above:

:strike:`point which is already done in our` |archive|_ :strike:`which
contains mp3 files`

.. |archive| replace:: :strike:`archive`
.. _archive: http://www.example.com/archive/

Note that you'd have to break up your sentence into 3 pieces.

Also, if you use your strikeout role a lot, you can set it as the
default interpreted text role and use `this syntax`:
http://docutils.sourceforge.net/docs/ref/rst/directives.html#setting-the-default-interpreted-text-role

David Goodger
<http://python.net/~goodger>

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.