Pasted URLs get not formatted as a link

I often copy and paste URLs from the Safari address bar to Scrivener.

With Scrivener 1.x pressing Return after pasting the URL formatted it into a clickable link.

This stopped working in Scrivener 2.0.2. Only if I go back and edit the URL line (e.g deleting the last letter and then adding it again) the link is created after pressing Return.

Nothing has changed since Scrivener 1.x in this regard at all. Scrivener itself has zero code managing this - it just uses the Cocoa NSTextView method -setAutomaticLinkDetectionEnabled:. When that is set to YES, it is entirely down to Apple’s code how links are detected (which I agree isn’t always perfect). I can’t see any difference in behaviour between Scrivener 2.0, TextEdit and Scrivener 1.x, which is what I would expect seeing as they all call through to the same Apple function.

There does seem to be a bug in Apple’s code that matches your description, though: if you paste a link from Safari’s address field into TextEdit and hit return, the link doesn’t get detected as it should either. It may be that their code observes the link as it is typed and doesn’t examine pasted text. Unfortunately I don’t have any control over this as the Apple code is a “black box”.

All the best,
Keith

Thanks a lot for your information Keith. I wished it where a Scrivener bug because I have not much hope that Apple will fix their new code any time soon. Their old code examined pasted text correctly. Anyway I’m glad I discovered the workaround.

Martin