From 7f1361960f644d4e4d5af88d1cbb95d48f1d7b58 Mon Sep 17 00:00:00 2001 From: Luke Leppan Date: Sat, 3 Apr 2021 11:56:14 +0200 Subject: [PATCH] Edit README.md --- README.md | 5 +++++ src/main.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f993138..c9655a8 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,11 @@ Works with all languages. - Customization presets - More stats +### Contributors + +- @leoccyao + - Added all word, char, sentence count when not viewing a markdown file. + ### Special Thanks - @liamcane diff --git a/src/main.ts b/src/main.ts index e5974af..17baf42 100644 --- a/src/main.ts +++ b/src/main.ts @@ -105,7 +105,7 @@ export default class BetterWordCount extends Plugin { let allCharacters = 0; let allSentences = 0; - for(const f of this.app.vault.getMarkdownFiles()){ + for (const f of this.app.vault.getMarkdownFiles()) { let fileContents = await this.app.vault.cachedRead(f); allWords += getWordCount(fileContents); allCharacters += getCharacterCount(fileContents);