Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbb614f2

Browse files
committed
docs: update link to features
1 parentd260367 commitbb614f2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎packages/docs/src/templates/DocsLayout.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,18 @@ const humanize = (text: string): string => {
6161

6262
constgetDescription=(location:Location,description:string)=>{
6363
if(location.pathname.includes('api')||location.pathname.includes('styling')){
64-
constregex=/React\s[A-Z][A-Za-z]*/
64+
constregex=/React\s+(.*?)\s+component/
6565
constparts=description.split(regex)
6666
constmatches=description.match(regex)
6767

68+
console.log('parts',parts)
69+
6870
if(matches&&parts.length>1){
6971
return(
7072
<>
7173
{parts[0]}
72-
<Linkto="../">{matches[0]}</Link>
73-
{parts[1]}
74+
<Linkto="../">React{parts[1]}</Link> component
75+
{parts[2]}
7476
</>
7577
)
7678
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp