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}