From 13b41616888b6f7a4254724b70fa993ea2b874e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=98=E6=96=B9=E5=B0=8F=E5=82=B2=E5=A8=87?= <111679857+DilemmaGX@users.noreply.github.com> Date: Tue, 12 Dec 2023 12:37:50 +0800 Subject: [PATCH] Auto replace space, "-", and "_" --- index.html | 2 +- src/static.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index e842507..3f1d84e 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@ -
+

Static Badge Maker

GitHub License m === '-' ? '--' : '__').replace(/\s/g, '_'); + right = right.replace(/[-_]/g, m => m === '-' ? '--' : '__').replace(/\s/g, '_'); + if (color == "" || color == undefined) { color = "default"; }