careteditor / issues

Caret issues
https://caret.io
324 stars 12 forks source link

"Stupid link" support #741

Open borekb opened 6 years ago

borekb commented 6 years ago

I generally love how Caret is smart about pasting links and it works well 95% of the time. However, I also have situations where all I want is to insert the correct Markdown syntax and not do any smartness.

For example, I have an example text and want to turn the word example into a link like an [example](|) text. I do this by selecting the word 'example' and pressing Ctrl+K but if there's a link in my clipboard, I end up with an [example](https://medium.com/some-random-post-thats-not-relevant-at-all) text.

I'd appreciate a keyboard shortcut that would just do the basic Markdown operation. I was thinking that Ctrl+Shift+K could be a good shortcut for that.

borekb commented 6 years ago

Seems like Caret thinks that self::$gitRepository is a link:

Before paste (both words selected):

end2end tests

After paste:

[end2end tests](self::$gitRepository)
borekb commented 6 years ago

Another slightly inconsistent behavior: there is https://example.com in my clipboard, see what happens:

Before paste:

image

After Ctrl+V:

image

Back to "code" and pressing Ctrl+K:

image

In most cases, when I have a link in my clipboard, just pasting and pressing Ctrl+K leads to the same result, but not here.

(Maybe this is a separate issues?)