Current behaviour
https://example.com => https://example.comfile://C:\AUTOEXEC.BAT => file://AUTOEXEC.BATexample.com => example.comoo.ps => oo.ps[email protected] => [email protected]<https://example.com> => https://example.comProposed behaviour
https://example.com => https://example.comfile://C:\AUTOEXEC.BAT => file://C:\AUTOEXEC.BATexample.com => example.comoo.ps => oo.ps[email protected] => test@example.com<https://example.com> => https://example.comIn general Joplin auto-links too much text, which is not necessary as Markdown already provides way to explicitly create a link. It is reasonable to auto-link URLs that start with a valid URL schemes, but other cases should be disabled.
CommonMark does not auto-link anything except for URLs within < >
Personal opinion is that Joplin should follow Commonmark. Any active links would have to be explicitly defined using the [name](link) or <link> formats. This would mean that any exported Markdown should be reproduced, as intended by the author, in any other Markdown-based app and would also remove the chance of "false positives".
HOWEVER
I appreciate that a certain amount of "auto-linking" adds somewhat to the ease and speed of use and, if an option to switch off auto-linking is not considered suitable, a logic that minimises "false positives" (as proposed above) sounds like a good compromise. Some URL-like text would still have to be purposefully "neutered" using HTML to break the hyperlink but the occurrance of such situations should be reduced.
Personal opinion is that Joplin should follow Commonmark.
Yes, ideally I'd prefer to stick closely to the CommonMark spec. It's hard to evaluate whether we really need auto-links for URL-like text. I don't think I need it much personally. Perhaps it's a matter of disabling it completely and see what users will say. We can always document that they should add <> around the URLs.
Well, that's the thing. I believe people are really split on that topic. That's why an option would make sense. Especially since it is just a boolean for the markdown-it renderer. Adding additional code to have a "better" link recognition actually is against your initial sentiment with regards to code maintenance.
Setting a flag however has no maintenance implications.
Most helpful comment
Personal opinion is that Joplin should follow Commonmark. Any active links would have to be explicitly defined using the
[name](link)or<link>formats. This would mean that any exported Markdown should be reproduced, as intended by the author, in any other Markdown-based app and would also remove the chance of "false positives".HOWEVER
I appreciate that a certain amount of "auto-linking" adds somewhat to the ease and speed of use and, if an option to switch off auto-linking is not considered suitable, a logic that minimises "false positives" (as proposed above) sounds like a good compromise. Some URL-like text would still have to be purposefully "neutered" using HTML to break the hyperlink but the occurrance of such situations should be reduced.