Add IDs to the headers generated by RST #391
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #71.
In #256, we stripped out the surrounding
divs generated by RST for headers, because it padded too much whitespace and made documents look weird. Unfortunately, it looks like we also stripped out valuableidelements. 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
aelement. It's actually really tough to go back into the underlying<h_>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