I would like to link to a text fragment, like so:
https://pvk.ca/Blog/2019/01/09/preemption-is-gc-for-memory-reordering/#event-counts-with-x86-tso-and-futexes:~:text=However%2C%20if%20we%20go
This link1 has a fragment as follows:
#event-counts-with-x86-tso-and-futexes:~:text=However%2C%20if%20we%20go
This links to the text "However, if we go" which appears part way down the page, with the heading with id event-counts-with-x86-tso-and-futexes
as the fallback. However, when clicking this link in Chrome, the targetted text is only briefly shown, and then the page scrolls to the #event-counts-with-x86-tso-and-futexes
heading.
If remove the #event-counts-with-x86-tso-and-futexes
part of the fragment (like this) it works fine, but then there is no fallback for browsers such as firefox which don't support linking to text.
1 Oddly, clicking that link here in the question doesn't seem to work at all, but if you copy and paste the link above, it does. Probably SO is encoding the link somehow, wrecking the fragment?