1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-27 10:30:28 +00:00

Support obsidian external link (#7149)

This commit is contained in:
Jeffrey Zhang 2022-12-24 23:56:46 +08:00 committed by GitHub
parent 95e6168839
commit 18d3ea9d14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -687,7 +687,7 @@ exports.escapeRegExp = function(s) {
// Checks whether a link target is external, i.e. not a tiddler title
exports.isLinkExternal = function(to) {
var externalRegExp = /^(?:file|http|https|mailto|ftp|irc|news|data|skype):[^\s<>{}\[\]`|"\\^]+(?:\/|\b)/i;
var externalRegExp = /^(?:file|http|https|mailto|ftp|irc|news|obsidian|data|skype):[^\s<>{}\[\]`|"\\^]+(?:\/|\b)/i;
return externalRegExp.test(to);
};

View File

@ -127,7 +127,7 @@ var insertMacroCall = function(w,output,macroName,paramString) {
var isLinkExternal = function(to) {
var externalRegExp = /(?:file|http|https|mailto|ftp|irc|news|data|skype):[^\s'"]+(?:\/|\b)/i;
var externalRegExp = /(?:file|http|https|mailto|ftp|irc|news|obsidian|data|skype):[^\s'"]+(?:\/|\b)/i;
return externalRegExp.test(to);
};
var rules = [