diff --git a/docs/src/components/react/CodePreview.tsx b/docs/src/components/react/CodePreview.tsx index cc79880..a0e611a 100644 --- a/docs/src/components/react/CodePreview.tsx +++ b/docs/src/components/react/CodePreview.tsx @@ -162,25 +162,32 @@ function tokenizeSegment(segment: string) { ); } else if (match[3]) { - // Modifier (.bold, .foregroundColor): add dot+name, then the ( back + // KeyPath (\.self) parts.push( {match[3]} ); - parts.push("("); } else if (match[4]) { - // Keyword + // Modifier (.bold, .foregroundColor): add dot+name, then the ( back parts.push( - + {match[4]} ); + parts.push("("); } else if (match[5]) { + // Keyword + parts.push( + + {match[5]} + + ); + } else if (match[6]) { // Type parts.push( - {match[5]} + {match[6]} ); }