Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

feat: handle tab in word counter

thecodrrdb368904203b
diff --git a/apps/web/src/components/editor/react-quill.js b/apps/web/src/components/editor/react-quill.js
index 63dfe3ba4..d7bbdae30 100644
--- a/apps/web/src/components/editor/react-quill.js
+++ b/apps/web/src/components/editor/react-quill.js
@@ -288,7 +288,7 @@ function countWords(str) {
// 13 = \r
// 10 = \n
// 42 = *
- if (s === 32 || s === 13 || s === 10 || s === 42) {
+ if (s === 32 || s === 13 || s === 10 || s === 42 || s === 9) {
if (shouldCount) continue;
++count;
shouldCount = true;
diff --git a/apps/web/yarn.lock b/apps/web/yarn.lock
index d2c2be5d5..a59f2068f 100644
--- a/apps/web/yarn.lock
+++ b/apps/web/yarn.lock
@@ -8999,21 +8999,9 @@ normalize-url@^3.0.0, normalize-url@^3.0.1:
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559"
integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==
-notes-core@../notes-core:
- version "5.4.1"
- dependencies:
- fast-sort "^2.0.1"
- fuzzysearch "^1.0.3"
- jshashes "^1.0.8"
- no-internet "^1.5.2"
- qclone "^1.0.4"
- quill-delta-to-html "^0.12.0"
- quill-delta-to-markdown "https://github.com/streetwriters/quill-delta-to-markdown"
- transfun "^1.0.2"
-
"notes-core@git+ssh://[email protected]:streetwriters/notesnook-core.git":
version "5.4.1"
- resolved "git+ssh://[email protected]:streetwriters/notesnook-core.git#41ce0e95476b25a7c84c13eaa29aa34e371318f5"
+ resolved "git+ssh://[email protected]:streetwriters/notesnook-core.git#9fdce8498fca3194d995c4181e86b7ebd36e7e77"
dependencies:
fast-sort "^2.0.1"
fuzzysearch "^1.0.3"