question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pasting URL always generates full link syntax

See original GitHub issue

Issue

Suppose the user has written the following text:

Elephants are the largest existing land animal (see [Wikipedia article](

Then, pasting the URI https://en.wikipedia.org/wiki/Elephant, and then typing ))., should result in text as follows:

Elephants are the largest existing land animal (see [Wikipedia article](https://en.wikipedia.org/wiki/Elephant)).

In fact the result is the following:

Elephants are the largest existing land animal (see [Wikipedia article]([Elephant - Wikipedia](https://en.wikipedia.org/wiki/Elephant))).

Environment

  • OS/Desktop: Mint 19.3, Cinnamon 4.4.8
  • Application version: 16.2

Notes

Strangely, both display the same in the editing buffer, which may be a separate bug.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:29 (15 by maintainers)

github_iconTop GitHub Comments

6reactions
brainchild0commented, Jun 29, 2020

I have no problem with both behaviors supported through different commands, but this behavior occurring with the paste command is confusing. A user who copies a URL from a browser window believes that the text in the clipboard is that URL, which would be pasted verbatim.

If the simple paste is already supported, perhaps the best solution is simply reversing how the application resolves which action. If regular pasting simply inserted the URL, then ctrl-shift-V might create the formatted link.

In either case, the documented effect is certainly a bug. Inserting a formatted link while the incomplete syntactical construction is in the buffer left of the caret will always create incorrect Markdown, and is always not the intention of the user. It might be appropriate to introduce a special case.

2reactions
guillemglezcommented, Aug 21, 2020

I understand you suggest that Ctrl + V should behave as Ctrl + Shift + V does at the moment? It does make sense. Actually in my case I did not know about the Shift option until I found this issue; was very frustrated on the default behaviour.

In my opinion it would be neater to have an “Automatically format pasted URL to link syntax” option. Changing current behaviour may produce the same frustration to users who are already used at the current functionality.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Announcing a new way to paste URLs, Link format!
When one first copies a URL, it's not always obvious that the full text is needed. Other times, it's desired to have both...
Read more >
How can I paste a link to a URL with custom text in Confluence?
You can do it all without leaving the keyboard, just like typing out the full syntax. To create all the links at once,...
Read more >
DOIs and URLs - APA Style
A DOI is a unique alphanumeric string that identifies content and provides a persistent link to its location on the internet. DOIs can...
Read more >
Excel HYPERLINK function to quickly create and edit multiple ...
To link to a certain web page, you can simply type its URL in a cell, hit Enter, and Microsoft Excel will automatically...
Read more >
HTML Links Hyperlinks - W3Schools
Note: A link does not have to be text. A link can be an image or any other HTML element! HTML Links -...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found