From 721f14537de8fbc746e8997cbcfb2d5f4906efcc Mon Sep 17 00:00:00 2001 From: Bairui Su Date: Thu, 11 Apr 2024 23:40:54 +0800 Subject: [PATCH] docs: visit is a named export of unist-util-visit (#10039) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sébastien Lorber --- .../docs/guides/markdown-features/markdown-features-plugins.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/guides/markdown-features/markdown-features-plugins.mdx b/website/docs/guides/markdown-features/markdown-features-plugins.mdx index a8ffb356a727..690a8d81bdac 100644 --- a/website/docs/guides/markdown-features/markdown-features-plugins.mdx +++ b/website/docs/guides/markdown-features/markdown-features-plugins.mdx @@ -160,7 +160,7 @@ The writeup below is **not** meant to be a comprehensive guide to creating a plu For example, let's make a plugin that visits every `h2` heading and adds a `Section X. ` prefix. First, create your plugin source file anywhere—you can even publish it as a separate npm package and install it like explained above. We would put ours at `src/remark/section-prefix.js`. A remark/rehype plugin is just a function that receives the `options` and returns a `transformer` that operates on the AST. ```js "src/remark/section-prefix.js" -import visit from 'unist-util-visit'; +import {visit} from 'unist-util-visit'; const plugin = (options) => { const transformer = async (ast) => {