Skip to content

Commit 54a5c59

Browse files
authored
fix: allow passing options to remark-mdc plugin in stringify helper (#424)
1 parent 21490cc commit 54a5c59

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"rehype-sort-attributes": "^5.0.1",
100100
"remark-emoji": "^5.0.2",
101101
"remark-gfm": "^4.0.1",
102-
"remark-mdc": "v3.6.0",
102+
"remark-mdc": "npm:remark-mdc-edge@3.6.0-29309210.1cda4d8",
103103
"remark-parse": "^11.0.0",
104104
"remark-rehype": "^11.1.2",
105105
"remark-stringify": "^11.0.0",

pnpm-lock.yaml

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

src/runtime/stringify/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function createStringifyProcessor(options: MDCStringifyOptions = {}) {
1515
})
1616
.use(mdcRemark)
1717
.use(gfm)
18-
.use(mdc)
18+
.use(mdc, options?.plugins?.remarkMDC?.options || {})
1919
.use(stringify, {
2020
bullet: '-',
2121
emphasis: '*',

src/types/stringify.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import type { Options as RemarkStringifyOptions } from 'remark-stringify'
2+
import type { RemarkMDCOptions } from 'remark-mdc'
23

34
export interface MDCStringifyOptions {
45
plugins?: {
56
remarkStringify?: {
67
options?: RemarkStringifyOptions
78
}
9+
remarkMDC?: {
10+
options?: RemarkMDCOptions
11+
}
812
}
913
}

0 commit comments

Comments
 (0)