Issues with resetting footnote counter
I've encountered some odd issues trying to reset footnote counters -- it seems to be interfering with the page counter as well, somehow. Here's an example:
We have this CSS that should reset only the footnote counter at the start of each new chapter:
*[data-hederis-type=hsecchapter] {
counter-reset: footnote;
}
It does indeed reset the footnote counter, but also messes up the page counter. The first place this appears is when we have a TOC that uses the page counter to insert target page numbers:
*[data-hederis-type=hblktocFM] *[data-hederis-type=hspana]::before {
content: target-counter(attr(href), page) " | ";
}
As soon as the first chapter appears in the TOC list, that dynamic content all gets set to 0:
(Pictured here is the TOC page in the background, and the element inspector on top of it, with one of the ::before elements selected.)
When inspecting, you can see there's a NaN value getting added to the counter reset somehow.
Then, when you navigate to the actual chapter pages, the page numbering itself is all off (though not 0). The counter seems to be ignoring pages (blanks maybe? But maybe more than that), so the page numbers are all progressively lower than they should be.
If I remove that counter-reset, the page numbers and TOC are all fine.
My first impulse was to assume this was something wrong with our code, but I've tried a bunch of permutations and stripped out some stuff, to no avail.