+ {({ style, tokens, getLineProps, getTokenProps }) => (
+
+ {tokens.map((line, i) => {
+ const lineProps = getLineProps({ line, key: i });
+
+ return (
+
+ token.content.includes(featureId)
+ )
+ ? '#E8E4F1'
+ : 'transparent'
+ }}
+ >
+
+ {codeRef.lineNumber + i}
+
+ {line.map((token, key) => {
+ const tokenProps = getTokenProps({ token, key });
+
+ const tokenContent = token.content;
+
+ // Split token content to highlight matched substring
+ const parts = tokenContent.split(
+ new RegExp(`(${featureId})`, 'gi')
+ );
+
+ return (
+
+ {parts.map((part, index) =>
+ part.toLowerCase() === featureId.toLowerCase() ? (
+
+ {part}
+
+ ) : (
+
+ {part}
+
+ )
+ )}
+
+ );
+ })}
+
+ );
+ })}
+
+ )}
+