diff --git a/src/features/source/source.ts b/src/features/source/source.ts index b532960..42a5913 100644 --- a/src/features/source/source.ts +++ b/src/features/source/source.ts @@ -119,9 +119,11 @@ const grammarChecker = checker(/\w+\s+\w+/gi); function checker(regex: RegExp) { return (subject: string, lang: string): (readonly [boolean, string])[] => { + return []; + let lastIndex = 0; - return Array.from(subject.matchAll(regex)).filter(() => Math.random() >= .5).flatMap(({ 0: match, index }) => { + return Array.from(subject.matchAll(regex)).filter(() => Math.random() >= .99).flatMap(({ 0: match, index }) => { const end = index + match.length; const result = [ [false, subject.slice(lastIndex, index)],