From 2124b19141560bf7548b294719ed5b90975e521a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=A2?= Date: Mon, 18 Sep 2023 09:33:52 +0800 Subject: [PATCH] refactor: share md absolute path with custom unified plugins (#1901) * feat(dev): add absolute addresses for plugin development * chore: fix * chore: update * chore: remove * Revert "chore: update" This reverts commit cfaab1893bcf21e528ab8bff841b32baa4471ce9. * chore: update --- src/loaders/markdown/transformer/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/loaders/markdown/transformer/index.ts b/src/loaders/markdown/transformer/index.ts index 389043d065..63198e9104 100644 --- a/src/loaders/markdown/transformer/index.ts +++ b/src/loaders/markdown/transformer/index.ts @@ -197,6 +197,9 @@ export default async (raw: string, opts: IMdTransformerOptions) => { }), ); + // info available to all plugins + processor.data('fileAbsPath', opts.fileAbsPath); + const result = await processor.use(rehypeJsxify).process(raw); return {