From 8879e9f843b1b7e8f23429d329c923478bfa818f Mon Sep 17 00:00:00 2001 From: Juntao Wang Date: Thu, 25 Jan 2024 13:28:11 -0500 Subject: [PATCH 1/2] Remove renderToString function and fix search crash issue --- packages/module/src/LogViewer/LogViewerRow.tsx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/module/src/LogViewer/LogViewerRow.tsx b/packages/module/src/LogViewer/LogViewerRow.tsx index 5d72a5c..01be88f 100644 --- a/packages/module/src/LogViewer/LogViewerRow.tsx +++ b/packages/module/src/LogViewer/LogViewerRow.tsx @@ -1,5 +1,4 @@ import React, { memo, useContext } from 'react'; -import ReactDOMServer from 'react-dom/server'; import { LOGGER_LINE_NUMBER_INDEX_DELTA } from './utils/constants'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/LogViewer/log-viewer'; @@ -51,16 +50,10 @@ export const LogViewerRow: React.FunctionComponent = memo(({ composedString.push(str); } else { const splitString = str.split(regEx); - splitString.forEach((substr, newIndex) => { + splitString.forEach((substr) => { if (substr.match(regEx)) { matchCounter += 1; - composedString.push( - ReactDOMServer.renderToString( - - {substr} - - ) - ); + composedString.push(`${substr}`); } else { composedString.push(escapeTextForHtml(substr)); } From 9099f62d77866c0f4fa717ac4a66b6b7577ceef9 Mon Sep 17 00:00:00 2001 From: Nicole Thoen Date: Wed, 31 Jan 2024 11:55:15 -0500 Subject: [PATCH 2/2] fix: whitespace change to trigger prerelease