markup icon indicating copy to clipboard operation
markup copied to clipboard

reStructured Text links to labels in same document do not work

Open felixfontein opened this issue 3 years ago • 0 comments

This is basically the problem described in #1219, but since rest2html is part of this repository I guess now this is the right place for creating this issue?

I'm trying to create working links inside a document to another part of that document that also show up in the RST preview on GitHub. :ref: references do not work (#122 because it's Sphinx specific), so I tried to stick to standard RST features:

Test section
============

Link: `link to target <target_>`_.

.. _target:

Target section
==============

The link should point to this section's title.

Rendering this yields something that looks fine, but the link does not work because the anchor isn't created. The link uses the anchor #target, but there is no anchor (or id) called target. https://gist.github.com/felixfontein/5ec5ad555ba6cdb293beb04c83280c90 demonstrates this.

felixfontein avatar Apr 12 '22 05:04 felixfontein