Include text fragment in URL generation so that anyone using the link to come back to the article lands in that relevant section
Things to address:
- length (URLs should not be very long)
- make sure non-Latin characters without wordspace breaks are handled well
- selection may have paragraph or line breaks
- this appears to work correctly
- fragment must URL-escape the "-" character per spec
- these are currently breaking on eg "A 2022 satellite image of Paris by ESA's Sentinel-2 mission":
- http://localhost:8080/w/index.php/Paris#:~:text=A%202022%20satellite%20image%20of%20Paris%2C%20by%20ESA's%20Sentinel-2%20mission
- note prefix and suffix context can be provided for multiple potential matches
Additional tweaks:
- selection may have boundaries in the middle of words
- these will not highlight properly!
- eg http://localhost:8080/w/index.php/Paris#:~:text=ity%20of%20France. doesn't match "city of France." because it breaks a word
- must either clip or expand those
- textFragment.js is the wrong place to fix this, it doesn't know it's in the middle of a word. have to do it where we're extracting the text from the selection.


