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

Solution 1:

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.

Solution 2:

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.