From 1429a069a6ee982707ce04712e3529a25f1594d4 Mon Sep 17 00:00:00 2001 From: Dominik Natter Date: Fri, 28 Mar 2025 11:26:30 +0100 Subject: [PATCH] fix include spaces and char limit --- src/app/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index cd6f3a3..96f1660 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -10,7 +10,7 @@ import WordDensity from "@/components/WordDensity"; const config = { includeSpaces: true, - charLimit: 500, + charLimit: 1000000, theme: "dark", }; @@ -38,7 +38,7 @@ export default function Home() { const result: any = {}; const inputText = text; - result.charCount = includeSpaces ? inputText.length : inputText.replace(/\s/g, "").length; + result.charCount = !includeSpaces ? inputText.length : inputText.replace(/\s/g, "").length; result.wordCount = (inputText.match(/[a-zA-ZäöüÄÖÜß]+/g) || []).length; result.sentenceCount = (inputText.match(/[\w\s][.?!](?=\s|$)/g) || []).length;