import type { ReactNode } from "react"; /** * Highlight step parameters (double-quoted strings, standalone numbers) in step * text — the React equivalent of the report's highlightStepParams. Returns a * node array so the matched params can be wrapped in a styled without * dangerouslySetInnerHTML. * * Regex mirrors the string renderer exactly: * - `"[^"]*"` double-quoted strings (numbers inside quotes stay part of the string) * - `(? { const start = match.index; const end = start + match[0].length; if (start > lastIndex) nodes.push(text.slice(lastIndex, start)); nodes.push( {match[0]} , ); lastIndex = end; }); if (lastIndex < text.length) nodes.push(text.slice(lastIndex)); return nodes; }