From 62a7644997a2b7dad2c5e9d8f8c5cd802d3dc8c2 Mon Sep 17 00:00:00 2001 From: Karl Horky Date: Sat, 29 Jun 2024 17:24:42 +0200 Subject: [PATCH] Recommend newer rehype-mdx-code-props Signed-off-by: Karl Horky --- docs/guides/syntax-highlighting.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/guides/syntax-highlighting.mdx b/docs/guides/syntax-highlighting.mdx index fc261e39c..de7989b30 100644 --- a/docs/guides/syntax-highlighting.mdx +++ b/docs/guides/syntax-highlighting.mdx @@ -150,13 +150,13 @@ the format of that meta string is, so it defaults to how markdown handles it: `meta` is ignored. But what if you want to access `meta` at runtime? -That’s exactly what the remark plugin -[`remark-mdx-code-meta`][remark-mdx-code-meta] does. +That’s exactly what the rehype plugin +[`rehype-mdx-code-props`][rehype-mdx-code-props] does. It lets you type JSX attributes in the `meta` part which you can access by with a component for `pre`. -That plugin, like all remark plugins, can be passed as -[`remarkPlugins` in `ProcessorOptions`][processor-options]. +That plugin, like all rehype plugins, can be passed as +[`rehypePlugins` in `ProcessorOptions`][processor-options]. More info on plugins is available in [§ Extending MDX][extend] [commonmark]: https://spec.commonmark.org/current/ @@ -167,7 +167,7 @@ More info on plugins is available in [§ Extending MDX][extend] [react-syntax-highlighter]: https://github.com/react-syntax-highlighter/react-syntax-highlighter -[remark-mdx-code-meta]: https://github.com/remcohaszing/remark-mdx-code-meta +[rehype-mdx-code-props]: https://github.com/remcohaszing/rehype-mdx-code-props [processor-options]: /packages/mdx/#processoroptions