Skip to content

pantoken / plugins/typedoc/demo/src / toDemoFence

Funktion: toDemoFence()

toDemoFence(spec): string

Beta

Omslut en demospecifikation i ett avgränsat demo-block.

Parametrar

spec

string

A demo spec: a bare URL or a <provider>:<ref> pair.

Returnerar

string

Det avgränsade kodblocket som en sträng.

Exempel

ts
import { toDemoFence } from "@pantoken/typedoc-plugin-demo";

toDemoFence("stackblitz:abc123"); // "```demo\nstackblitz:abc123\n```"