I think this was improved in FEATURE: Enhance onebox descriptions with URL fragment/anchor context by IanButterworth · Pull Request #36536 · discourse/discourse · GitHub
Your example https://www.whonix.org/wiki/Onion_Services#cite_note-11 now looks like this:
Without the anchor it’s still