devdocs.el
devdocs.el copied to clipboard
fix: URL decodes path fragements, if needed
Why?:
- When looking up documentation for the Nim language, the ID for a specific function for example is an URL encoded anchor fragment.
text-property-search-forwarddoes not URL decode the fragment, so the ID won't be found inside the rendered text and we're always stuck at the top.
This change addresses the need by:
- Call url-unhex-string on the argument for setting shr-target-id
Honestly, I'm not too sure if this is the right way to do it, but if the fragment or path fragment is not URL encoded it shouldn't do any harm (at least in the tests I did). I also don't know if it might not be better to URL decode the path fragments when installing a document. I'm open for suggestions.