Merge pull request #912 from hmhealey/plt174

PLT-174 Added emailto: to the beginning of email links
Этот коммит содержится в:
Christopher Speller
2015-10-02 10:24:31 -04:00
родитель 2f60ab82a8 fe8c04c973
Коммит c427e9c9d6

Просмотреть файл

@@ -87,8 +87,10 @@ function autolinkUrls(text, tokens) {
const linkText = match.getMatchedText();
let url = linkText;
if (url.lastIndexOf('http', 0) !== 0) {
url = `http://${linkText}`;
if (match.getType() === 'email') {
url = `mailto:${url}`;
} else if (url.lastIndexOf('http', 0) !== 0) {
url = `http://${url}`;
}
const index = tokens.size;