From f417ba2b95f2c346f389184de7cdacf658097a63 Mon Sep 17 00:00:00 2001 From: "Mr.Hope" Date: Tue, 10 Oct 2023 23:22:17 +0800 Subject: [PATCH 1/4] fix: add support for custom protocol, close #1404 --- .../src/client/components/AutoLink.vue | 4 ++-- packages/shared/src/utils/hasProtocol.ts | 5 ++++ packages/shared/src/utils/index.ts | 4 +--- packages/shared/src/utils/isLinkExternal.ts | 4 +--- packages/shared/src/utils/isLinkFtp.ts | 4 ---- packages/shared/src/utils/isLinkMailto.ts | 4 ---- packages/shared/src/utils/isLinkTel.ts | 4 ---- packages/shared/tests/hasProtocal.spec.ts | 24 +++++++++++++++++++ packages/shared/tests/isLinkExternal.spec.ts | 10 ++++---- packages/shared/tests/isLinkFtp.spec.ts | 21 ---------------- packages/shared/tests/isLinkMailto.spec.ts | 23 ------------------ packages/shared/tests/isLinkTel.spec.ts | 23 ------------------ 12 files changed, 38 insertions(+), 92 deletions(-) create mode 100644 packages/shared/src/utils/hasProtocol.ts delete mode 100644 packages/shared/src/utils/isLinkFtp.ts delete mode 100644 packages/shared/src/utils/isLinkMailto.ts delete mode 100644 packages/shared/src/utils/isLinkTel.ts create mode 100644 packages/shared/tests/hasProtocal.spec.ts delete mode 100644 packages/shared/tests/isLinkFtp.spec.ts delete mode 100644 packages/shared/tests/isLinkMailto.spec.ts delete mode 100644 packages/shared/tests/isLinkTel.spec.ts diff --git a/ecosystem/theme-default/src/client/components/AutoLink.vue b/ecosystem/theme-default/src/client/components/AutoLink.vue index e15784a31b..ef17b96f66 100644 --- a/ecosystem/theme-default/src/client/components/AutoLink.vue +++ b/ecosystem/theme-default/src/client/components/AutoLink.vue @@ -10,7 +10,7 @@ export default defineComponent({