import { type MarkedOptions } from "https://deno.land/x/frugal@0.9.0/doc/dep/marked.ts";
const { MarkedOptions } = MarkedOptions;
Properties
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.
Add tokenizers and renderers to marked
Properties
Properties
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
A function to highlight code blocks. The function can either be synchronous (returning a string) or asynchronous (callback invoked with an error if any occurred during highlighting and a string if highlighting was successful)
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.
Mangle autolinks (email@domain.com).
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.
Sanitize the output. Ignore any HTML that has been input. If true, sanitize the HTML passed into markdownString with the sanitizer function.
Optionally sanitize found HTML with a sanitizer function.
Use smarter list behavior than the original markdown. May eventually be default with the old behavior moved into pedantic.
Use "smart" typograhic punctuation for things like quotes and dashes.
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.
Properties
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.
Add tokenizers and renderers to marked
import { type MarkedOptions } from "https://deno.land/x/frugal@0.9.0/doc/dep/marked.ts";
const { MarkedOptions } = MarkedOptions;