File tree
Expand file treeCollapse file tree1 file changed
+5
-3
lines changed packages/docs/src/templates
Expand file treeCollapse file tree1 file changed
+5
-3
lines changed Original file line number | Diff line number | Diff line change |
---|
@@ -61,16 +61,18 @@ const humanize = (text: string): string => {
|
61 | 61 |
|
62 | 62 | const getDescription = (location: Location, description: string) => {
|
63 | 63 | if (location.pathname.includes('api') || location.pathname.includes('styling')) {
|
64 |
| -const regex = /React\s[A-Z][A-Za-z]*/ |
| 64 | +const regex = /React\s+(.*?)\s+component/ |
65 | 65 | const parts = description.split(regex)
|
66 | 66 | const matches = description.match(regex)
|
67 | 67 |
|
| 68 | +console.log('parts', parts) |
| 69 | + |
68 | 70 | if (matches && parts.length > 1) {
|
69 | 71 | return (
|
70 | 72 | <>
|
71 | 73 | {parts[0]}
|
72 |
| -<Link to="../">{matches[0]}</Link> |
73 |
| -{parts[1]} |
| 74 | +<Link to="../">React {parts[1]}</Link> component |
| 75 | +{parts[2]} |
74 | 76 | </>
|
75 | 77 | )
|
76 | 78 | }
|
|
You can’t perform that action at this time.
0 commit comments