Add skype: protocol for external links

The matching of external links is hacky at the moment. The plan is to
make it more easily extensible (ie without writing code)
print-window-tiddler
Jeremy Ruston 2013-10-20 10:47:02 +01:00
rodzic 25612958d7
commit 2b5fb9801f
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -26,7 +26,7 @@ exports.types = {inline: true};
exports.init = function(parser) {
this.parser = parser;
// Regexp to match
this.matchRegExp = /~?(?:file|http|https|mailto|ftp|irc|news|data):[^\s'"<>]+(?:\/|\b)/mg;
this.matchRegExp = /~?(?:file|http|https|mailto|ftp|irc|news|data|skype):[^\s'"<>]+(?:\/|\b)/mg;
};
exports.parse = function() {

Wyświetl plik

@ -13,7 +13,7 @@ Implements the link widget.
"use strict";
var isLinkExternal = function(to) {
var externalRegExp = /(?:file|http|https|mailto|ftp|irc|news|data):[^\s'"]+(?:\/|\b)/i;
var externalRegExp = /(?:file|http|https|mailto|ftp|irc|news|data|skype):[^\s'"]+(?:\/|\b)/i;
return externalRegExp.test(to);
};