gambier
gambier copied to clipboard
Pasting URLs onto existing URLs should not generate Markdown link syntax
As-is, we get the following:
- Copy URL to clipboard:
https://github.com
- Select URL in
[Site](google.com)
- Paste URL.
- Expected result:
[Site](https://github.com)
- Actual result:
[Site]([google.com](https://github.com/jcarpenter/gambier/issues/new))
I think the problem is that our pasting logic is naive. When we paste, if 1) we have a URL in the clipboard, and 2) we have text selected, it generates a new Markdown link. We need to be more discriminating. If we have a URL selected, for example, we should just paste the plain text.