GoogleChromeLabs / link-to-text-fragment

Browser extension that allows for linking to arbitrary text fragments.
https://chrome.google.com/webstore/detail/link-to-text-fragment/pbcodcjpfjdpcineamnnmbkkmkdpajjg
Apache License 2.0
412 stars 33 forks source link

Unable to link to text inside table #86

Closed gaiking-uk closed 1 year ago

gaiking-uk commented 1 year ago

Hi, I tried to manually generate a text fragment link URL manually and by using Edge extension, however even though the extension highlighted the selected text and generated a link, the generated URL would not trigger the scroll-to-text-fragment functionality.

TextFragementLink Screenshot

The only thing that I can think that may be interfering with it, is that the text was inside a <TD> tag...

❓ Is this a limitation by design?

tomayac commented 1 year ago

The browser built-in "Copy link to highlight" feature creates this link:

https://imagemagick.org/script/download.php#:~:text=x64%2Dstatic.exe-,Win64%20static%20at%2016%20bits%2Dper%2Dpixel%20component%20with,-high%20dynamic%2Drange

The extension creates this link:

https://imagemagick.org/script/download.php#:~:text=x64-static.exe-,win64%20static%20at%2016%20bits-per-pixel%20component%20with,-high%20dynamic-range

Could you please file this as a new Issue in the repo of the text-fragments? I'm closing the present Issue.

gaiking-uk commented 1 year ago

Thanks for the quick investigation and follow-up (also, I have to confess I completely overlooked the built-in "copy link to highlight" feature until you mentioned it, so that is good to know at least! 👍🏼)

I've created a new issue as requested (as best I can based on my understanding) #150... I did some quick checks/comparisons on the two string and it looks like it is an encoding on issue on "-", however the correct/working link contains both decoded "-" and encoded (%2D) so I am not quite sure what is going on so please feel free to add to the issue if you are able to describe better.