Skip to content

Commit

Permalink
fix(core): cmdk command highlight (#9390)
Browse files Browse the repository at this point in the history
  • Loading branch information
pengx17 committed Dec 27, 2024
1 parent 64827f7 commit 8bceece
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ export const HighlightText = ({ text = '', end, start }: HighlightProps) => {

return (
<span className={styles.highlightText}>
{parts.map(part =>
{parts.map((part, index) =>
typeof part === 'string' ? (
<Fragment key={part}>{part}</Fragment>
) : (
<span key={part.h} className={styles.highlightKeyword}>
<span key={part.h + '.' + index} className={styles.highlightKeyword}>
{part.h}
</span>
)
Expand Down

0 comments on commit 8bceece

Please sign in to comment.