Text-to-link fragment breaks line number highlighting.
Steps to reproduce
- Install https://kojipkgs.fedoraproject.org//packages/firefox/126.0/7.fc40/x86_64/firefox-126.0-7.fc40.x86_64.rpm (from https://koji.fedoraproject.org/koji/rpminfo?rpmID=38627430).
- Install https://addons.mozilla.org/firefox/downloads/file/4267777/text_fragment-0.7.xpi (from https://github.com/ichaoX/ext-textFragment/releases/tag/v0.7) or alternative myriad implementations, including Google's.
- Visit https://gitlab.com/gitlab-org/gitlab/-/blob/f12f7463e1de345cb2f57700804ea26c08a5c131/README.md#L1:~:text=%23-,GitLab,-%23%23%20Canonical%20source.
What is the current bug behavior?
The correct line is never highlighted by GitLab. This means that if the link-to-text fragment identification fails (most probably, because it's invalid, due to page change, especially when viewing a URI on the main
branch, like https://gitlab.com/gitlab-org/gitlab/-/blob/master/README.md?ref_type=heads#L1:~:text=%23-,GitLab,-%23%23%20Canonical%20source)
the line specified isn't highlighted:
This works at GitHub. See https://github.com/uutils/coreutils/blob/f0923094d21c34e32f77b55400f2063a446eff05/README.md?plain=1#L25-L26:~:text=uutils%20coreutils%20is%20a%20cross%2Dplatform,%5BRust%5D(http://www.rust%2Dlang.org).
:
What is the expected correct behavior?
Regardless of whether the browser supports a text-to-link fragment, GitLab should highlight the specified line:
Edited by `{3rd: "Beedell", 1st: "Roke"}`{.JSON5}