gistpress
gistpress copied to clipboard
Duplicate IDs
If you look at the source for http://www.poststat.us/automating-i18n-wordpress-themes/ you'll see that the gists produce duplicate IDs, where the same gist has been used (but showing different lines).
This <div id="gist...">
comes from the GitHub JSON, but we should find a way to fix it, since we're the ones allowing multiple uses of it. We can't use line-numbers as a suffix, since that wouldn't cover when the whole of a gist is shown twice (i.e. start and end of a tutorial).
We might need to count the gist references (whether by shortcode or oembed) during the request (request, not post, so it can cover the same gist being shown multiple times in full-content post archive) and add an index accordingly.
Is the ID useful? What if we were to remove it altogether? Otherwise, a counter sounds like the best bet and is how WordPress handles things like galleries.
Aside from that main ID, there are other instances of duplicate IDs further down in the Gist, but that's more an issue with GitHub not accounting for scenarios where similar Gists appear on the same page.
I guess removing it would be sufficient.
Any updates on this? The duplicate ID is still an issue.