From d819190e5cdcd73e60db2ad241ef487d4cb3555a Mon Sep 17 00:00:00 2001 From: Joshua Horton Date: Thu, 29 Jan 2026 09:10:17 -0600 Subject: [PATCH] docs(web): add review-requested comment --- .../worker-thread/src/main/correction/search-quotient-spur.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-spur.ts b/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-spur.ts index 9c963f35a5..e5992a3180 100644 --- a/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-spur.ts +++ b/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-spur.ts @@ -124,6 +124,8 @@ export abstract class SearchQuotientSpur implements SearchQuotientNode { const bestLocalInput = this.inputs?.reduce((max, curr) => max.p < curr.p ? curr : max) ?? { sample: { insert: '', deleteLeft: 0 }, p: 1}; return { + // Take the parent node's result, apply delete-lefts, then apply our most + // likely local insert. text: KMWString.substring(bestPrefix.text, 0, this.parentNode.codepointLength - bestLocalInput.sample.deleteLeft) + bestLocalInput.sample.insert, p: bestPrefix.p * bestLocalInput.p }