Skip to content

pantoken / renderers/react-markdown/src / rehypeColorCodes

Fungsi: rehypeColorCodes()

rehypeColorCodes(): (tree) => void

Beta

Plugin rehype yang membungkus nilai warna berdiri sendiri dalam <span data-color-code="…">, supaya lapisan React boleh merender swatch. Mencerminkan pipeline icon-token.

Mengembalikan

(tree) => void

Contoh

tsx
import Markdown from "react-markdown";
import { rehypeColorCodes } from "@pantoken/react-markdown";

<Markdown rehypePlugins={[rehypeColorCodes]}>Brand is #03893D.</Markdown>;