github/markup — pull request #391 by gjtorikian (2014-11-07 23:08:50+00:00)
Title: Add IDs to the headers generated by RST

Closes https://github.com/github/markup/issues/71.

In https://github.com/github/markup/pull/256, we stripped out the surrounding `div`s generated by RST for headers, because it padded too much whitespace and made documents look weird. Unfortunately, it looks like we also stripped out valuable `id` elements. I'm not sure how #71 predates the PR in #256, but in any event, we need to preserve the IDs.

This PR adds those IDs back as a simple `a` element. It's actually really tough to go back into the underlying `` tags, so this seems like a good compromise.

Note that I could not get the MiniTest suite to run on my local machine, so I changed a few parts about how it was called. I also found that the one and only RST test in the fixtures folder didn't accurately capture the problem described in #71, so I added a new file.

/cc @bkeepers