task()
ts
function task(checked, node): Node;Defined in: task.ts:33
Builder-element for a task list item
Parameters
| Parameter | Type | Description |
|---|---|---|
checked | boolean | Whether the task is checked |
node | string | Node | Content of this element |
Returns
A markdown node
Example
ts
import { define, task, list } from "@ogs-gmbh/markdown";
const markdown = define(
list(
"unordered",
task(true, "Finish project"),
task(false, "Start weekend")
)
);
console.assert(
markdown.toString()
);See
Since
1.0.0
Author
Simon Kovtyk