From 39df55cfe59519d4b5628dfdebb1ef8747fe9e30 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 26 Nov 2021 17:55:14 -0500 Subject: [PATCH] fix logbox color --- src/ui/React/LogBoxManager.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/React/LogBoxManager.tsx b/src/ui/React/LogBoxManager.tsx index 197e35b7c..05a3beea4 100644 --- a/src/ui/React/LogBoxManager.tsx +++ b/src/ui/React/LogBoxManager.tsx @@ -134,16 +134,16 @@ function LogWindow(props: IProps): React.ReactElement { } function lineClass(s: string): string { - if (s.match(/\[[^\]]+\] ERROR/) || s.match(/\[[^\]]+\] FAIL/)) { + if (s.match(/(^\[[^\]]+\] )?ERROR/) || s.match(/(^\[[^\]]+\] )?FAIL/)) { return classes.error; } - if (s.match(/\[[^\]]+\] SUCCESS/)) { + if (s.match(/(^\[[^\]]+\] )?SUCCESS/)) { return classes.success; } - if (s.match(/\[[^\]]+\] WARN/)) { + if (s.match(/(^\[[^\]]+\] )?WARN/)) { return classes.warning; } - if (s.match(/\[[^\]]+\] INFO/)) { + if (s.match(/(^\[[^\]]+\] )?INFO/)) { return classes.info; } return classes.primary;