mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-12 02:10:27 +00:00
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)
This commit is contained in:
parent
25612958d7
commit
2b5fb9801f
@ -26,7 +26,7 @@ exports.types = {inline: true};
|
|||||||
exports.init = function(parser) {
|
exports.init = function(parser) {
|
||||||
this.parser = parser;
|
this.parser = parser;
|
||||||
// Regexp to match
|
// 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() {
|
exports.parse = function() {
|
||||||
|
@ -13,7 +13,7 @@ Implements the link widget.
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var isLinkExternal = function(to) {
|
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);
|
return externalRegExp.test(to);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user