Skip to content

pantoken / renderers/react-markdown/src / rehypeColorCodes

Swyddogaeth: rehypeColorCodes()

rehypeColorCodes(): (tree) => void

Bêta

Plwg rehype sy'n lapio gwerthoedd lliw unigol yn <span data-color-code="…">, fel y gall haen React ddangos sampl lliw. Yn adlewyrchu'r icon-token pipeline.

Yn dychwelyd

(tree) => void

Enghraifft

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

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