GitHub rendering does not respect case-sensitive anchor tag names
If you have a namespace with both Db (a protocol) and db (a function), the generated table of contents as GitHub renders it will incorrectly link both entries to the same db section due to the collision.
Inspecting GitHub's HTML shows that a case-insensitive naming scheming is applied e.g. user-content-db (for Db) and user-content-db-1 (for db), which perhaps hints at an approach to fixing this.
This is definitely not super important but I figured it was worth capturing :slightly_smiling_face:
@refset But the links in the TOC should still work... right?
Yes the TOC still contains clickable links that scroll the page, but they both scroll to the same db heading because GitHub ignores the case-sensitivity of the two otherwise distinct URL fragments [...]#my.ns/Db vs [...]#my.ns/db
Is there anything quickdoc can do to fix this?
I reckon always adding a positional index as a suffix to the tag names regardless (-1, -2, -3, etc.) would never fail to disambiguate all the generated/interpreted links. It would break any existing links people may be relying on though. To mitigate that impact we could specifically look for case-insensitive duplicate entries and only disambiguate those (but also check that you're not about to introduce new collisions in that case!)...but perhaps that's too haphazard :thinking:
This is kind of what I had before:
https://github.com/borkdude/quickdoc/blob/66e4835e4b95d2dc2967aa5f984d11bedf4493fb/src/quickdoc/impl.clj#L113-L118
but got lost in a PR which improved the links in the TOC.
https://github.com/borkdude/quickdoc/blob/66e4835e4b95d2dc2967aa5f984d11bedf4493fb/src/quickdoc/impl.clj#L159-L162