Sometimes oneboxes contain the same link multiple times and the link count was shown for each of them. This commit adds link count only to the most important link, that being either a heading or the header of the onebox.
I think this was supposed to be an object? (or a
Map even, though that would require Ching the code below)
I think we need to provide more details here for the comment to be useful for future readers. What does “best a” means here? From the code, it seems like we want the onebox with the most links?
This pull request has been mentioned on Discourse Meta. There might be relevant details there: