Skip to main content
Module

x/markdown/mod.ts>MarkedOptions

Deno Markdown module forked from https://github.com/ts-stack/markdown/tree/bb47aa8e625e89e6aa84f49a98536a3089dee831
Latest
class MarkedOptions
Re-export
import { MarkedOptions } from "https://deno.land/x/markdown@v2.0.0/mod.ts";

Properties

optional
breaks: boolean
optional
escape: (html: string, encode?: boolean) => string

The function that will be using to escape HTML entities. By default using inner helper.

optional
gfm: boolean
optional
headerPrefix: string
optional
highlight: (code: string, lang?: string) => string
optional
isNoP: boolean

If set to true, an inline text will not be taken in paragraph.

// isNoP == false
Marked.parse('some text'); // returns '<p>some text</p>'

Marked.setOptions({isNoP: true});

Marked.parse('some text'); // returns 'some text'
optional
langPrefix: string
optional
mangle: boolean
optional
pedantic: boolean
optional
renderer: Renderer

An object containing functions to render tokens to HTML. Default: new Renderer()

optional
sanitize: boolean
optional
sanitizer: (text: string) => string
optional
silent: boolean
optional
smartLists: boolean
optional
smartypants: boolean
optional
tables: boolean
optional
unescape: (html: string) => string

The function that will be using to unescape HTML entities. By default using inner helper.

optional
xhtml: boolean

Self-close the tags for void elements (<br/>, <img/>, etc.) with a "/" as required by XHTML.