Code highlighting issue - collapsed

I recently noticed a bug on GitHub where if I navigate to a URL depicting a collapsed line on a PR, GitHub does not actually highlight the actual line.

The only way to make this work:

  • Open up the PR
  • Expand the specific code section
  • Revisit the PR URL again in the same browser window (Somehow the browser knows that the lines should not be collapsed)

URL looks something like this - https://{HOST URL}/…/pull/…/files#diff-…

A link to a problematic example would be useful.