-
Notifications
You must be signed in to change notification settings - Fork 37
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
Feature auto link #204
Feature auto link #204
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great !
} | ||
const [_, leadingSpace, text, scheme] = match; | ||
// If no scheme, use default scheme http:// | ||
const href = scheme ? text : `http://${text}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make it default to https?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are quite some website that are http only (e.g. corporate-internal websites). And for most https sites they would redirect http requests to https anyway.
4e267e6
to
ddf4670
Compare
@kepta I just updated the tld regexp, also handled a corner case (see the last commit) |
Fix #186