jgm/pandoc — pull request #1049 by blaenk (2013-11-09 06:07:07+00:00)
Title: [HTML Writer] give sup with footnote links a distinguishing feature (e.g. class)

On my site I like to style the `` elements with footnote links in them differently from other `` elements. To accomplish this, because there's no parent selector in CSS, I have to resort to Javascript by using a selector such as `'sup .footnoteRef'`, then getting the matched elements' parent (the `` tag), and finally adding a class to it.

This works, but I was wondering why the `` class themselves don't have a class of some sort, IIRC, kramdown (the previous markdown implementation I used) did give `` tags containing footnote links some sort of distinguishing feature, an id to be exact:

``` html
1
```

Granted, just because kramdown does it isn't reason enough for Pandoc to do it too, but it was a minor and useful little feature.

I modified the HTML writer to simply add an `fnlnk` class to all `` tags that contain footnote links. I gave it that name in an attempt to follow the pattern, such as `fnref`, but of course that can be changed.

I don't know how receptive you guys might be to this change, but it seemed small enough to me (with some nice advantages) that I figured it might be worth suggesting.

Tests were updated to reflect the change, and the test suite passes.