isaacs / github

Just a place to track issues and feature requests that I have for github
2.21k stars 129 forks source link

GitHub's reStructuredText renderer doesn't process links correctly. #892

Open thanatos opened 7 years ago

thanatos commented 7 years ago

For example, the following .rst will not render correctly:

a directory of `reStructuredText <restructuredtext_>`_ files.

.. _restructuredtext: http://docutils.sourceforge.net/rst.html

The link should point to docutils.sourceforge.net; instead, it points to ./restructuredtext_.

mathieui commented 7 years ago

Adding to this, the following should create and link to an anchor in the text; instead, it links to another page (which obviously does not exist).

`Link <test-anchor_>`_

.. _test-anchor:

A block of text

Reference is: http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#hyperlink-references ; and the rst2html tool produces the right output

JessicaS11 commented 4 years ago

I'm having a similar GitHub link rendering issue when I try to use :ref:. At the top of my contact.rst files I have .. _contact_ref_label:. When I try to include a link to that document from another page (another .rst file) using:

:ref:`contact page<contact_ref_label>`

it shows up as an empty link with the text ":ref:`contact page`" on GitHub (but correctly renders as "contact page" and creates the correct, working link on ReadTheDocs).

xykivo commented 4 years ago

The :doc:`path_to_file' does not work either.