Skip to content

heading()

ts
function heading(type, value): Node;

Defined in: heading.ts:38

Builder-element for a heading

Parameters

ParameterTypeDescription
typeHeadingTypeType of this heading
valuestring | NodeContent of this element

Returns

Node

A markdown node

Example

ts
import { define, heading } from "@ogs-gmbh/markdown";

const markdown = define(
  heading("h1", "Welcome")
);

console.assert(
  markdown.toString()
);

See

https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#headings

Since

1.0.0

Author

Simon Kovtyk