Skip to content

Commit

Permalink
refactor: share md absolute path with custom unified plugins (#1901)
Browse files Browse the repository at this point in the history
* feat(dev): add absolute addresses for plugin development

* chore: fix

* chore: update

* chore: remove

* Revert "chore: update"

This reverts commit cfaab18.

* chore: update
  • Loading branch information
Wxh16144 authored Sep 18, 2023
1 parent d2d6068 commit 2124b19
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/loaders/markdown/transformer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2124b19

Please sign in to comment.