code()
ts
function code(value, options?): Node;Defined in: code.ts:82
Builder-element for code
Parameters
| Parameter | Type | Description |
|---|---|---|
value | string | Node | The content of this element |
options? | CodeOptions | Configuration options for this element |
Returns
A markdown node
Example
ts
import { define, code } from "@ogs-gmbh/markdown";
const markdown = define(
code("let a = 5;", { language: "ts" })
);
console.assert(
markdown.toString()
);See
Since
1.0.0
Author
Simon Kovtyk