gfm()
Erstellt ein GFM-Plugin, das die Erweiterungen von GitHub Flavored Markdown aktiviert.
import { gfm } from "@unifast/node";Signatur
function gfm(options?: GfmPluginOptions): UnifastPluginParameter
options?
Konfiguration der einzelnen GFM-Funktionen
| Eigenschaft | Typ | Standard | Beschreibung |
|---|---|---|---|
tables | boolean | true | Pipe-Tabellen mit |-Syntax aktivieren |
taskList | boolean | true | - [x] / - [ ]-Aufgabenlisten-Checkboxen aktivieren |
strikethrough | boolean | true | |
footnotes | boolean | true | 1-Fußnotenreferenzen und -definitionen aktivieren |
autolink | boolean | true | Bare URLs automatisch verlinken |
Verwendung
import { compile, gfm } from "@unifast/node";
const result = compile(md, {
plugins: [
gfm({
tables: true,
taskList: true,
strikethrough: true,
footnotes: true,
autolink: true,
}),
],
});