Skip to content

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

Function: rewriteComment() ​

rewriteComment(comment): void

Beta

Move every @demo block tag on a comment into demo fences appended to its summary, in order. Block-tag content gets re-fenced by the markdown theme, so the fence must live in the summary prose, which is emitted verbatim.

Parameters ​

comment ​

Comment

The comment to rewrite in place.

Returns ​

void

Example ​

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

// Given a comment with `@demo self:button`, appends a ```demo``` fence and drops the tag.
rewriteComment(comment);