diff --git a/logic_test.ts b/logic_test.ts index be980f7..cd15702 100644 --- a/logic_test.ts +++ b/logic_test.ts @@ -72,6 +72,10 @@ Deno.test("getRemovableFiles never removes #keeplist.txt", () => { Deno.test("resolveKeeplistName uses default and prefixed keeplist names deterministically", () => { assertEquals(resolveKeeplistName(null), "#keeplist.txt"); assertEquals(resolveKeeplistName("vanilla"), "#vanilla-keeplist.txt"); + assertEquals( + resolveKeeplistName("Vanilla_Profile"), + "#Vanilla_Profile-keeplist.txt", + ); }); Deno.test("getRemovableFiles never removes the active prefixed keeplist", () => { diff --git a/main.ts b/main.ts index 9ebc5f9..f504547 100644 --- a/main.ts +++ b/main.ts @@ -490,14 +490,13 @@ function applyPrefixValue(rawValue) { return true; } - const normalized = trimmed.toLowerCase(); - if (!/^[a-z0-9_-]+$/.test(normalized)) { + if (!/^[A-Za-z0-9_-]+$/.test(trimmed)) { setPrefixValidationError("Prefix must use only letters, numbers, underscores, or hyphens."); updateActiveKeeplistName(); return false; } - keeplistPrefix = normalized; + keeplistPrefix = trimmed; setPrefixValidationError(""); updateActiveKeeplistName(); return true;