How to have same text in two links with restructured text? How to have same text in two links with restructured text? python python

How to have same text in two links with restructured text?


The warning

(WARNING/2) Duplicate explicit target name:foo

occurs when you use the same text for two different links in "Named hyperlink references":

`Foo <http://example.org>`_`Foo <http://example.com>`_

To circumvent it, use anonymous hyperlink references with double underscores:

`Foo <http://example.org>`__`Foo <http://example.com>`__

This works without a warning on docutils 0.8.1.


I think you'll want to use anonymous hyperlinks:

1. `link`__2. `link`____ http://www.google.com__ http://www.yahoo.com

Keep in mind that the order they're referred to in the document is important. More information can be found here.


Seems like you need a newline and two underscores.

This is what I do:

What is that Process object good for? `(html)<process.html>`__`(html) <other.process.rst>`__

to obtain:

What is that Process object good for? <a class="reference external" href="process.html">(html)</a><a class="reference external" href="process.rst">(html)</a>