Skip to content

Commit 9faee32

Browse files
committed
fix scripts
1 parent c9eca0a commit 9faee32

File tree

4 files changed

+150
-1
lines changed

4 files changed

+150
-1
lines changed

package-lock.json

Lines changed: 146 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"react-dom": "^18.2.0",
4444
"react-markdown": "^9.0.1",
4545
"rehype-slug": "^6.0.0",
46+
"rehype-stringify": "^10.0.1",
4647
"remark-comment": "^1.0.0",
4748
"remark-frontmatter": "^5.0.0",
4849
"remark-gfm": "^4.0.1",

scripts/extract-indices.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import fs from "fs";
1111
import { URL } from 'url';
1212
import remarkRehype from "remark-rehype";
1313
import rehypeSlug from "rehype-slug";
14+
import rehypeStringify from "rehype-stringify";
1415

1516
import { defaultProcessor } from "./markdown.js";
1617

@@ -68,6 +69,7 @@ const processor = defaultProcessor
6869
.use(remarkRehype)
6970
.use(rehypeSlug)
7071
.use(rehypeHeaders)
72+
.use(rehypeStringify)
7173

7274
const pathname = new URL('.', import.meta.url).pathname;
7375
const __dirname = process.platform !== 'win32' ? pathname : pathname.substring(1)

scripts/extract-tocs.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* This script is used for generating the table of contents for prose
33
* text documents
44
*/
5-
import unified from "unified";
5+
import { unified } from "unified";
66
import glob from "glob";
77
import path from "path";
88
import fs from "fs";

0 commit comments

Comments
 (0)