Skip to content

pantoken-root / plugins/typedoc/demo/src / toDemoFence

Functie: toDemoFence() ​

toDemoFence(spec): string

Bèta

Plaats één demo-specificatie in een afgebakend demo-blok.

Parameters ​

spec ​

string

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

Retourneert ​

string

Het afgebakende codeblok als een tekenreeks.

Voorbeeld ​

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

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