Skip to main content
Module

x/gfm/mod.ts>Marked.MarkedExtension

Server-side GitHub Flavored Markdown rendering for Deno
Latest
interface Marked.MarkedExtension
import { type Marked } from "https://deno.land/x/gfm@0.6.0/mod.ts";
const { MarkedExtension } = Marked;

Properties

optional
async: boolean

True will tell marked to await any walkTokens functions before parsing the tokens and returning an HTML string.

optional
breaks: boolean | undefined

Enable GFM line breaks. This option requires the gfm option to be true.

optional
extensions: TokenizerAndRendererExtension[] | undefined | null

Add tokenizers and renderers to marked

optional
gfm: boolean | undefined

Enable GitHub flavored markdown.

optional
hooks: HooksObject | undefined | null

Hooks are methods that hook into some part of marked. preprocess is called to process markdown before sending it to marked. processAllTokens is called with the TokensList before walkTokens. postprocess is called to process html after marked has finished parsing.

optional
pedantic: boolean | undefined

Conform to obscure parts of markdown.pl as much as possible. Don't fix any of the original markdown bugs or poor behavior.

optional
renderer: RendererObject | undefined | null

Type: object Default: new Renderer()

An object containing functions to render tokens to HTML.

optional
silent: boolean | undefined

Shows an HTML error message when rendering fails.

optional
tokenizer: TokenizerObject | undefined | null

The tokenizer defines how to turn markdown text into tokens.

optional
walkTokens: ((token: Token) => void | Promise<void>) | undefined | null

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.