From 5736d29ce1172ca56ae47b443fee55465a4e6468 Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Sun, 20 Oct 2024 15:04:15 +0800 Subject: [PATCH] support zotero:// external link --- core/modules/utils/utils.js | 2 +- plugins/tiddlywiki/tw2parser/wikitextrules.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/utils/utils.js b/core/modules/utils/utils.js index 234de0c756a..08cb54ef9b6 100644 --- a/core/modules/utils/utils.js +++ b/core/modules/utils/utils.js @@ -699,7 +699,7 @@ exports.encodeURIComponentExtended = 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|obsidian|data|skype):[^\s<>{}\[\]`|"\\^]+(?:\/|\b)/i; + var externalRegExp = /^(?:file|http|https|mailto|ftp|irc|news|obsidian|data|skype|zotero):[^\s<>{}\[\]`|"\\^]+(?:\/|\b)/i; return externalRegExp.test(to); }; diff --git a/plugins/tiddlywiki/tw2parser/wikitextrules.js b/plugins/tiddlywiki/tw2parser/wikitextrules.js index 068bb975737..a627ad0d4ab 100755 --- a/plugins/tiddlywiki/tw2parser/wikitextrules.js +++ b/plugins/tiddlywiki/tw2parser/wikitextrules.js @@ -127,7 +127,7 @@ var insertMacroCall = function(w,output,macroName,paramString) { var isLinkExternal = function(to) { - var externalRegExp = /(?:file|http|https|mailto|ftp|irc|news|obsidian|data|skype):[^\s'"]+(?:\/|\b)/i; + var externalRegExp = /(?:file|http|https|mailto|ftp|irc|news|obsidian|data|skype|zotero):[^\s'"]+(?:\/|\b)/i; return externalRegExp.test(to); }; var rules = [