-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More closely follow CommonMark for link auto-generation. #3839
Comments
Personal opinion is that Joplin should follow Commonmark. Any active links would have to be explicitly defined using the 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. |
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. |
Implemented here: #3975 |
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 < >
The text was updated successfully, but these errors were encountered: