mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
chore: update github-slugger
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
"@types/react": "^18.0.20",
|
"@types/react": "^18.0.20",
|
||||||
"astro": "^1.1.7",
|
"astro": "^1.1.7",
|
||||||
"fuse.js": "^6.6.2",
|
"fuse.js": "^6.6.2",
|
||||||
"github-slugger": "^1.4.0",
|
"github-slugger": "^2.0.0",
|
||||||
"remark-collapse": "^0.1.2",
|
"remark-collapse": "^0.1.2",
|
||||||
"remark-toc": "^8.0.1"
|
"remark-toc": "^8.0.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import GithubSlugger from "github-slugger";
|
import GithubSlugger from "github-slugger";
|
||||||
import type { Frontmatter } from "src/types";
|
import type { Frontmatter } from "src/types";
|
||||||
|
|
||||||
const slugger = GithubSlugger.slug;
|
const slugger = new GithubSlugger().slug;
|
||||||
|
|
||||||
export const slugifyStr = (str: string) => slugger(str);
|
export const slugifyStr = (str: string) => slugger(str);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user