From e433e27bc87c24ed34c1921e31d73b8c678d0055 Mon Sep 17 00:00:00 2001 From: Weves Date: Wed, 13 Sep 2023 18:23:46 -0700 Subject: [PATCH] Small highlighting fix --- web/src/components/search/DocumentDisplay.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/src/components/search/DocumentDisplay.tsx b/web/src/components/search/DocumentDisplay.tsx index 83423570364b..d2b23bbb1970 100644 --- a/web/src/components/search/DocumentDisplay.tsx +++ b/web/src/components/search/DocumentDisplay.tsx @@ -75,9 +75,9 @@ const buildDocumentSummaryDisplay = ( } } currentText = ""; - previousIsBold = shouldBeBold; - previousIsContinuation = isContinuation; } + previousIsBold = shouldBeBold; + previousIsContinuation = isContinuation; if (!isContinuation || index === 0) { currentText += " "; } @@ -86,6 +86,9 @@ const buildDocumentSummaryDisplay = ( if (currentText) { if (previousIsBold) { currentText = currentText.trim(); + if (!previousIsContinuation) { + finalJSX[finalJSX.length - 1] = finalJSX[finalJSX.length - 1] + " "; + } finalJSX.push( {currentText}