@@ -30,11 +30,11 @@ export const HighlightText = ({ text = '', end, start }: HighlightProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<span className={styles.highlightText}>
|
<span className={styles.highlightText}>
|
||||||
{parts.map(part =>
|
{parts.map((part, index) =>
|
||||||
typeof part === 'string' ? (
|
typeof part === 'string' ? (
|
||||||
<Fragment key={part}>{part}</Fragment>
|
<Fragment key={part}>{part}</Fragment>
|
||||||
) : (
|
) : (
|
||||||
<span key={part.h} className={styles.highlightKeyword}>
|
<span key={part.h + '.' + index} className={styles.highlightKeyword}>
|
||||||
{part.h}
|
{part.h}
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user