Skip to content

pantoken-root / renderers/react-markdown/src / parseAlertMarker

Mahi: parseAlertMarker() ​

parseAlertMarker(text): { marker: AlertMarker; rest: string; } | undefined

Beta

Tātari i tētahi tohu whakatūpato GitHub i te tīmatanga o te kuputuhi; ka whakahokia te tohu me te toenga o te kuputuhi.

Ngā Tawhā ​

text ​

string

Whakahokia ​

{ marker: AlertMarker; rest: string; } | undefined

Tauira ​

ts
import { parseAlertMarker } from "@pantoken/react-markdown";

parseAlertMarker("[!TIP] Helpful"); // { marker: "TIP", rest: "Helpful" }
parseAlertMarker("Plain text"); // undefined