File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
- export { transform as remarkCodeHike } from "./remark/transform"
1
+ export { attacher as remarkCodeHike } from "./remark/transform"
2
2
3
3
export { highlight } from "./highlighter"
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { valueToEstree } from "./to-estree"
10
10
import { CH_CODE_CONFIG_VAR_NAME } from "./unist-utils"
11
11
import { JsxNode , SuperNode , visit } from "./nodes"
12
12
import { addConfigDefaults , CodeHikeConfig } from "./config"
13
+ import { Attacher } from "unified"
13
14
14
15
const transforms = [
15
16
transformPreviews ,
@@ -20,7 +21,9 @@ const transforms = [
20
21
transformInlineCodes ,
21
22
transformCodes ,
22
23
]
23
- export function transform ( unsafeConfig : CodeHikeConfig ) {
24
+ export const attacher : Attacher <
25
+ [ CodeHikeConfig ?]
26
+ > = unsafeConfig => {
24
27
return async ( tree : SuperNode , file : any ) => {
25
28
const config = addConfigDefaults (
26
29
unsafeConfig ,
You can’t perform that action at this time.
0 commit comments