This seems to be working here, but not on SO.
I was answering a question today and wanted to add a link to an inline code block. In markdown it looked like this:
`Timer`
Then I highlighted the word "Timer" without the quotes, pressed the link button, pasted my link, posted the answer and the link was broken, it showed up like this: [Timer][1]
.
That fails to render as a link, but does render as inline code. I'm not a language expert by any means, and I don't think the spec is explicit on what should happen in this case, but it seems like this should be a valid inline code span with a link in it.
In any case, if the link box is pressed, it seems like it should try to produce a valid link from the selection.
Backtick code spans, autolinks, and raw HTML tags bind more tightly than the brackets in link text. Thus, for example, [foo`]` could not be a link text, since the second ] is part of a code span.
So the behavior above is expected