gambier icon indicating copy to clipboard operation
gambier copied to clipboard

Pasting URLs onto existing URLs should not generate Markdown link syntax

Open jcarpenter opened this issue 4 years ago • 0 comments

As-is, we get the following:

  1. Copy URL to clipboard: https://github.com
  2. Select URL in [Site](google.com)
  3. Paste URL.
  4. Expected result: [Site](https://github.com)
  5. 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.

jcarpenter avatar Sep 18 '20 17:09 jcarpenter