From d73c683d889cb4e6539b9276ddde6f66511ee743 Mon Sep 17 00:00:00 2001 From: Eyal Lapid <17731302+elpddev@users.noreply.github.com> Date: Fri, 26 Aug 2022 19:12:47 +0300 Subject: [PATCH 1/2] Add missing import to the example Add missing import to the custom rehype plugin example --- docs/guides/syntax-highlighting.server.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/guides/syntax-highlighting.server.mdx b/docs/guides/syntax-highlighting.server.mdx index 509eb168a..942d1b7f4 100644 --- a/docs/guides/syntax-highlighting.server.mdx +++ b/docs/guides/syntax-highlighting.server.mdx @@ -153,6 +153,8 @@ to interpret the `meta` field. For example, it’s possible to pass that string as a prop with a rehype plugin: ```js path="rehype-meta-as-attributes.js" +import {visit} from 'unist-util-visit'; + /** @type {import('unified').Plugin, import('hast').Root>} */ function rehypeMetaAsAttributes() { return (tree) => { From 4d34822d8e4570b2667e42a7ce5fc30dea61fa34 Mon Sep 17 00:00:00 2001 From: Titus Date: Sat, 27 Aug 2022 16:17:59 +0200 Subject: [PATCH 2/2] Update docs/guides/syntax-highlighting.server.mdx --- docs/guides/syntax-highlighting.server.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/syntax-highlighting.server.mdx b/docs/guides/syntax-highlighting.server.mdx index 942d1b7f4..7e13f3189 100644 --- a/docs/guides/syntax-highlighting.server.mdx +++ b/docs/guides/syntax-highlighting.server.mdx @@ -153,7 +153,7 @@ to interpret the `meta` field. For example, it’s possible to pass that string as a prop with a rehype plugin: ```js path="rehype-meta-as-attributes.js" -import {visit} from 'unist-util-visit'; +import {visit} from 'unist-util-visit' /** @type {import('unified').Plugin, import('hast').Root>} */ function rehypeMetaAsAttributes() {