From 27e4d7e3bb1def332f9ef3ae60eba89633adcf40 Mon Sep 17 00:00:00 2001 From: sw5678 <151949597+sw5678@users.noreply.github.com> Date: Thu, 31 Jul 2025 14:03:43 +0100 Subject: [PATCH] Fixing linting issues --- src/core/operations/WordCount.mjs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/operations/WordCount.mjs b/src/core/operations/WordCount.mjs index a34e88f90..98fc2d82f 100644 --- a/src/core/operations/WordCount.mjs +++ b/src/core/operations/WordCount.mjs @@ -63,9 +63,7 @@ class WordCount extends Operation { for (let j = 0; j < inputArray.length; j++) { // Trim whitespace and replace punctuation - const word = inputArray[j].replace(/[!"#\$%&\(\)\*\+,-\.\/:;<=>\?@\[\\\]\^_`\{\\}~£\|]/g, "").trim(); - - + const word = inputArray[j].replace(/[!"#$%&()*+,-./:;<=>?@[\\\]^_`{}~£|]/g, "").trim(); // If empty string or ', then skip if (word === "" || /[']+/.test(word)) { @@ -102,7 +100,7 @@ class WordCount extends Operation { // Process output to string let output = "WORD,COUNT\n"; - output = output + order.map(entry => `${entry},${counter[entry]}`).join('\n'); + output = output + order.map(entry => `${entry},${counter[entry]}`).join("\n"); // Add total counter at the bottom if (args[1]) {