Pasted URL replaces selection that includes inline code

A few times now I’ve wanted to linkify a selection like

for details, see [class `Foo`](https://example.org)

Unfortunately this won’t work if the selection spans inline code, as pasting the URL simply replaces the selected text instead of wrapping it in a link. I’d argue that this scenario is common enough that it would be worth accounting for.