From 5db1ff82aaa0c4d1ebbb4e7acfe7fa2685609172 Mon Sep 17 00:00:00 2001 From: Anand Chowdhary Date: Sat, 2 Jul 2022 21:05:53 +0200 Subject: [PATCH] :bug: Use words, not characters, in word count --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index e930e9b..8edb1f6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -35,7 +35,7 @@ const parseNoteFile = async ( slug: file, title: title, date, - words: contents.length - (title || "").length, + words: contents.split(" ").length, }; };