From 98984e3e227af219ee3b6e2f5daf44ba3ab558c0 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Fri, 14 Feb 2025 16:22:33 +1100 Subject: [PATCH] increase the threshold for the random errors so it is less overwhelming. and also disable the random errors so that I can merge into main --- src/features/source/source.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)],