From 0cd0170f2abaf42831ab7ea4e8f002e16dfeeb42 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Mon, 8 Jul 2024 22:37:08 -0700 Subject: [PATCH] Delete extraneous trim The regex replace already collapses the whitespace so no there's no need for another trim. --- main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.ts b/main.ts index 824d803..831eb61 100644 --- a/main.ts +++ b/main.ts @@ -10,7 +10,7 @@ export function parseInput(input: string | null): Array { const words = input .trim() .replaceAll(/\s+/g, " ") - .split(" ").map((w) => w.trim()); + .split(" "); return words; } -- 2.47.3