From 5d1885bbff4d5b69d30bbd42d1a064debcb4ee0d Mon Sep 17 00:00:00 2001 From: Joshua Horton Date: Wed, 1 Oct 2025 11:48:39 -0500 Subject: [PATCH] change(web): fix minor nits from review --- .../src/main/correction/context-tokenization.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web/src/engine/predictive-text/worker-thread/src/main/correction/context-tokenization.ts b/web/src/engine/predictive-text/worker-thread/src/main/correction/context-tokenization.ts index 177c42c992..6b3df47e82 100644 --- a/web/src/engine/predictive-text/worker-thread/src/main/correction/context-tokenization.ts +++ b/web/src/engine/predictive-text/worker-thread/src/main/correction/context-tokenization.ts @@ -772,12 +772,14 @@ export function analyzePathMergesAndSplits(priorTokenization: string[], resultTo */ splitOffset: number, /** - * The edit operations needed to transition from the first tokenization to the second. + * The edit operations needed to transition from the first (prior) + * tokenization to the second (result) tokenization. */ editPath: EditTuple[], /** * The edit operations needed _after_ applying any merge or split operations - * to the first tokenization in order to transition to the second. + * to the first (prior) tokenization in order to transition to the second + * (result) tokenization. * * No 'merge' or 'split' edits will appear in this version. */ @@ -798,7 +800,7 @@ export function analyzePathMergesAndSplits(priorTokenization: string[], resultTo // We've found the root token to which changes may apply. // We've found the last post-application token to which transform changes contributed. // Did anything shift at or near that intersection? - const preTokenization = priorTokenization + const preTokenization = priorTokenization; const calc = computeDistance( new SegmentableDistanceCalculation({ diagonalWidth: Math.abs(preTokenization.length - resultTokenization.length) + 2,