From b943698178abe3b8eaa14020bc405219cd3d51b4 Mon Sep 17 00:00:00 2001 From: "W.T. Chang" <1546333+wtchangdm@users.noreply.github.com> Date: Sat, 9 Nov 2024 05:22:10 +0800 Subject: [PATCH] minor tweak --- processUsers.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/processUsers.js b/processUsers.js index 0cb39c0d..d1043288 100644 --- a/processUsers.js +++ b/processUsers.js @@ -57,9 +57,9 @@ var cache = {}; function parseDirname(user) { return user.url .split("//") - .at(1) // take everything after protocol - .replaceAll('/', '-') // and replace every slash with hyphen - .replace(/-$/, ''); // and remove the trailing hyphen if there is one + .at(1) // take everything after protocol + .replace(/\/$/, '') // and remove the trailing slash if there is one + .replaceAll('/', '-'); // and replace remaining slashs with hyphen } async function convert(text, from, to) {