Small highlighting fix

This commit is contained in:
Weves
2023-09-13 18:23:46 -07:00
parent 2bf38fa996
commit e433e27bc8

View File

@@ -75,9 +75,9 @@ const buildDocumentSummaryDisplay = (
} }
} }
currentText = ""; currentText = "";
previousIsBold = shouldBeBold;
previousIsContinuation = isContinuation;
} }
previousIsBold = shouldBeBold;
previousIsContinuation = isContinuation;
if (!isContinuation || index === 0) { if (!isContinuation || index === 0) {
currentText += " "; currentText += " ";
} }
@@ -86,6 +86,9 @@ const buildDocumentSummaryDisplay = (
if (currentText) { if (currentText) {
if (previousIsBold) { if (previousIsBold) {
currentText = currentText.trim(); currentText = currentText.trim();
if (!previousIsContinuation) {
finalJSX[finalJSX.length - 1] = finalJSX[finalJSX.length - 1] + " ";
}
finalJSX.push( finalJSX.push(
<b key={sections.length} className="text-gray-200 bg-pink-950"> <b key={sections.length} className="text-gray-200 bg-pink-950">
{currentText} {currentText}