gfm()
GitHub Flavored Markdown の拡張を有効にする GFM プラグインを生成します。
import { gfm } from "@unifast/node";シグネチャ
function gfm(options?: GfmPluginOptions): UnifastPluginパラメータ
options?
GFM の各機能の設定
| プロパティ | 型 | デフォルト | 説明 |
|---|---|---|---|
tables | boolean | true | | 構文のパイプテーブルを有効にする |
taskList | boolean | true | - [x] / - [ ] のタスクリストチェックボックスを有効にする |
strikethrough | boolean | true | |
footnotes | boolean | true | 1 の脚注参照と定義を有効にする |
autolink | boolean | true | URL を自動的にリンクにする |
使い方
import { compile, gfm } from "@unifast/node";
const result = compile(md, {
plugins: [
gfm({
tables: true,
taskList: true,
strikethrough: true,
footnotes: true,
autolink: true,
}),
],
});