github/gollum — Issue #277: reST table of contents (and a-target links) non-functional
Author: twooster
Created: 2012-02-27 19:38:01+00:00
State: open

reStructuredText formatted pages, for whatever reason, do not create id targets for internal links. For example, given the following reST:

```restructuredtext
.. contents: TOC

Test reST Page
==============

Section
-------

Here is some text. Take a look at `Section 2`_.

Section 2
---------

Why don't you go back to the `Test reST Page`_ heading?
```

Gollum (or at least Github Wikis) will appropriately generate a table of contents, and all of the links, but none of the links will actually work. When inspecting the resulting HTML, although the generated links contain intelligently generated targets (e.g. `#wiki-id-1` or `#wiki-id-section_2`) no id attributes are attached to any HTML elements.