Znak
Znak is a parser for a Markdown-like markup language that supports a smaller subset of Markdown syntax, and is stricter and more opinionated. It has features like syntax highlighting, LaTeX, and heading IDs built-in.
The name "Znak" comes from the Polish word "znak", meaning "sign" or "mark".
Usage
Install the package as a dependency to your project.
shbun add @noclaps/znak
Import the package in your code, and use it.
tsimport { render, headings } from "@noclaps/znak"; const text = "# Hello World"; // Your text to be rendered. const renderedHTML = render(text); // <h1 id="hello-world">Hello World</h1> const headings = headings(text); // [{depth: 1, slug: "hello-world", title: "Hello World"}]
See the Types documentation for all of the configuration options and types, and the Syntax documentation for the supported syntax.