Skip to content

Commit 5cfc8f6

Browse files
committed
[FIX] generateMarkdown.js
1 parent 4a00b4b commit 5cfc8f6

85 files changed

Lines changed: 90 additions & 88 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/react-tools-demo/scripts/generateMarkdown.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ function buildHooksUtilsMarkdownObject(file) {
309309
index++;
310310
}
311311
line = codeLines[index].substring("function ".length, codeLines[index].length-1);
312-
obj.type = line;
312+
obj.type = line.trim();
313313
return obj;
314314
} else {
315315
typeLine = typeLine.substring("function ".length);
@@ -357,7 +357,7 @@ function buildHooksUtilsMarkdownObject(file) {
357357
typeLine = typeLine.substring("{".length);
358358
}
359359
typeLine = typeLine.split("").reverse().join("");
360-
obj.type = obj.title+typeLine;
360+
obj.type = obj.title.trim()+typeLine.trim();
361361
return obj;
362362
}
363363

apps/react-tools-demo/src/App.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ code {
120120

121121
.open-nav {
122122
position: absolute;
123-
top: 10;
124-
left: 10;
123+
top: 10px;
124+
left: 10px;
125125
z-index: 999;
126126
display: none;
127127
}

apps/react-tools-demo/src/layout/MainLayout.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default function MainLayout() {
6464
to={"/" + name}
6565
onClick={() => {
6666
containerRef.current?.scrollTo(0, 0);
67-
closeNav();
67+
window.innerWidth < 1190 && closeNav();
6868
}}
6969
>
7070
{name}
@@ -76,7 +76,10 @@ export default function MainLayout() {
7676
key={group as string}
7777
className={pathname === ("/" + group) ? 'active' : ''}
7878
to={"/" + group}
79-
onClick={()=>containerRef.current?.scrollTo(0,0)}
79+
onClick={() => {
80+
containerRef.current?.scrollTo(0, 0);
81+
window.innerWidth < 1190 && closeNav();
82+
}}
8083
>
8184
{group}
8285
</Link>

apps/react-tools-demo/src/markdown/hotKeyHandler.md

Lines changed: 1 addition & 1 deletion

apps/react-tools-demo/src/markdown/isAsync.md

Lines changed: 1 addition & 1 deletion

apps/react-tools-demo/src/markdown/isClient.md

Lines changed: 1 addition & 1 deletion

apps/react-tools-demo/src/markdown/isDeepEqual.md

Lines changed: 1 addition & 1 deletion

apps/react-tools-demo/src/markdown/isMouseEvent.md

Lines changed: 1 addition & 1 deletion

apps/react-tools-demo/src/markdown/isShallowEqual.md

Lines changed: 1 addition & 1 deletion

apps/react-tools-demo/src/markdown/isTouchEvent.md

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)