import { type Marked } from "https://deno.land/x/gfm@0.3.0/deps.ts";
const { MarkedExtension } = Marked.MarkedOptions;
Properties
True will tell marked to await any walkTokens functions before parsing the tokens and returning an HTML string.
Enable GFM line breaks. This option requires the gfm option to be true.
Add tokenizers and renderers to marked
Hooks are methods that hook into some part of marked. preprocess is called to process markdown before sending it to marked. postprocess is called to process html after marked has finished parsing.
Conform to obscure parts of markdown.pl as much as possible. Don't fix any of the original markdown bugs or poor behavior.
Type: object Default: new Renderer()
An object containing functions to render tokens to HTML.
The tokenizer defines how to turn markdown text into tokens.
The walkTokens function gets called with every token. Child tokens are called before moving on to sibling tokens. Each token is passed by reference so updates are persisted when passed to the parser. The return value of the function is ignored.