Skip to content

Commit 314ac3b

Browse files
authored
Merge pull request #250 from GeekyAnts/staging
Staging
2 parents 2c28351 + 9518fd7 commit 314ac3b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/docs/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const checkHeading = (headingLevelMap: any) => {
5656
result.push({
5757
level: headingLevelMap[i].level,
5858
title: headingLevelMap[i].title,
59-
id: headingLevelMap[i].id,
59+
id: "h"+(headingLevelMap[i].level+1)+"-"+headingLevelMap[i].id,
6060
});
6161
}
6262
}

src/new-components/markdown-components/Heading2.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const Heading2 = ({ children }: any) => {
2121
{content}
2222
</Heading>
2323
{isHovered && (
24-
<Link href={"#" + id}>
24+
<Link href={"#" + "h2-" + id}>
2525
<Icon as={Fontisto} name="link" color="coolGray.500" size="4" />
2626
</Link>
2727
)}

src/new-components/markdown-components/Heading3.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const Heading3 = ({ children }: any) => {
2121
{content}
2222
</Heading>
2323
{isHovered && (
24-
<Link href={"#" + id}>
24+
<Link href={"#" + "h3-" + id}>
2525
<Icon
2626
as={Fontisto}
2727
name="link"

0 commit comments

Comments
 (0)