diff --git a/apps/dokploy/components/dashboard/docker/logs/terminal-line.tsx b/apps/dokploy/components/dashboard/docker/logs/terminal-line.tsx
index c25acc67..116efedf 100644
--- a/apps/dokploy/components/dashboard/docker/logs/terminal-line.tsx
+++ b/apps/dokploy/components/dashboard/docker/logs/terminal-line.tsx
@@ -35,45 +35,34 @@ export function TerminalLine({ log, noTimestamp, searchTerm }: LogLineProps) {
})
: "--- No time found ---";
- const highlightMessage = (text: string, term: string) => {
- if (!term) {
+ const highlightMessage = (text: string, term: string) => {
+ if (!term) {
+ return (
+
+ );
+ }
+
+ const htmlContent = fancyAnsi.toHtml(text);
+ const searchRegex = new RegExp(`(${escapeRegExp(term)})`, "gi");
+
+ const modifiedContent = htmlContent.replace(
+ searchRegex,
+ (match) =>
+ `${match}`,
+ );
+
return (
);
- }
-
- const htmlContent = fancyAnsi.toHtml(text);
- const modifiedContent = htmlContent.replace(
- /]*)>([^<]*)<\/span>/g,
- (match, attrs, content) => {
- const searchRegex = new RegExp(`(${escapeRegExp(term)})`, "gi");
- if (!content.match(searchRegex)) return match;
-
- const segments = content.split(searchRegex);
- const wrappedSegments = segments
- .map((segment: string) =>
- segment.toLowerCase() === term.toLowerCase()
- ? `${segment}`
- : segment,
- )
- .join("");
-
- return `${wrappedSegments}`;
- },
- );
-
- return (
-
- );
- };
+ };
const tooltip = (color: string, timestamp: string | null) => {
const square = (