From 919ff5df3cff8614008876572ee2bc528924d89a Mon Sep 17 00:00:00 2001 From: Andy Hsu Date: Wed, 6 Dec 2023 16:21:21 +0800 Subject: [PATCH] fix: scheme parse wrong (close alist-org/alist#5639) --- src/utils/str.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/str.ts b/src/utils/str.ts index 5b9af3b5c..3f3cf7944 100644 --- a/src/utils/str.ts +++ b/src/utils/str.ts @@ -66,7 +66,7 @@ export const convertURL = (scheme: string, args: ConvertURLArgs) => { args.d_url = d.toString() } ans = ans.replace(/\$[eb_]*url/, (old) => { - const op = old.match(/e|b/) + const op = old.match(/[eb]/g) let u = args.raw_url if (op) { for (const o of op.reverse()) { @@ -80,7 +80,7 @@ export const convertURL = (scheme: string, args: ConvertURLArgs) => { return u }) ans = ans.replace(/\$[eb_]*durl/, (old) => { - const op = old.match(/e|b/) + const op = old.match(/[eb]/g) let u = args.d_url if (op) { for (const o of op.reverse()) {