Skip to content

Commit

Permalink
fix(editor): force lowercase in statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Dec 28, 2021
1 parent a2de929 commit 2880738
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/better-write-app/src/use/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ export const useProject = () => {
value.raw.split(' ').forEach((raw) => {
const normalize = raw
.trim()
.replace(/[~`!“”@#$%^&*()+={}\[\];:\'\"<>.,\/\\\?-_]/g, '')
.toLowerCase()
.replace(/[~`!\“\”@#$%^&*()+={}\[\];:\'\"<>.,\/\\\?-_]/g, '')
.replaceAll('...', '')

if (normalize.length <= min) return
Expand Down

0 comments on commit 2880738

Please sign in to comment.