Skip to content

pantoken / renderers/react-markdown/src / rehypeGithubAlerts

Fonksyon: rehypeGithubAlerts()

rehypeGithubAlerts(): (tree) => void

Beta

Yon plugin rehype ki make blockquotes alèt GitHub: li detekte yon makè tip [!NOTE]-style nan kòmansman yon blockquote, anrejistre li kòm data-alert="note", epi retire tèks makè a. Konpozan React blockquote la apre sa rann yon InstUI Alert.

Retounen

(tree) => void

Egzanp

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

<Markdown rehypePlugins={[rehypeGithubAlerts]}>{"> [!NOTE]\n> Heads up."}</Markdown>;