msnoigrs / ox-rst

reStructuredText Back-End for Org-Mode Export Engine
116 stars 18 forks source link

Multiple links with same label/name lead to an invalid reST file. #51

Open snilek opened 4 years ago

snilek commented 4 years ago

Export of two or more org links with same name/label results in an invalid reST file. This is caused by ox-rst exporting references as named links instead of anonymous links.

Thus this .org notation:

[[https://example.com][this]] and [[http://example2.com][this]]

is exported as

`this <https://example.com>`_ and `this <http://example2.com>`_

creating an invalid reST file.

The solution would be to

  1. use anonymous links only, or
  2. use named link only in the first reference.

and thus to export the above fragment like this:

`this <https://example.com>`__ and `this <http://example2.com>`__

Thanks and regards, Jan Janský