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"
22
33export { highlight } from "./highlighter"
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { valueToEstree } from "./to-estree"
1010import { CH_CODE_CONFIG_VAR_NAME } from "./unist-utils"
1111import { JsxNode , SuperNode , visit } from "./nodes"
1212import { addConfigDefaults , CodeHikeConfig } from "./config"
13+ import { Attacher } from "unified"
1314
1415const transforms = [
1516 transformPreviews ,
@@ -20,7 +21,9 @@ const transforms = [
2021 transformInlineCodes ,
2122 transformCodes ,
2223]
23- export function transform ( unsafeConfig : CodeHikeConfig ) {
24+ export const attacher : Attacher <
25+ [ CodeHikeConfig ?]
26+ > = unsafeConfig => {
2427 return async ( tree : SuperNode , file : any ) => {
2528 const config = addConfigDefaults (
2629 unsafeConfig ,
You can’t perform that action at this time.
0 commit comments