Skip to content

Interface: MarkdownExitOptions

Defined in: core.ts:35

Extends

Properties

breaks?

ts
optional breaks: boolean;

Defined in: renderer.ts:26

Set true to convert \n in paragraphs into <br>.

Default

ts
false

Inherited from

RenderOptions.breaks


highlight?

ts
optional highlight: 
  | (str, lang, attrs, env) => string | Promise<string>
  | null;

Defined in: renderer.ts:42

Highlighter function for fenced code blocks. Highlighter function (str, lang, attrs) should return escaped HTML. It can also return empty string if the source was not changed and should be escaped externally. If result starts with <pre... internal wrapper is skipped.

Default

ts
null

Inherited from

RenderOptions.highlight


html?

ts
optional html: boolean;

Defined in: core.ts:42

Set true to enable HTML tags in source. Be careful! That's not safe! You may need external sanitizer to protect output from XSS. It's better to extend features via plugins, instead of enabling HTML.

Default

ts
false

langPrefix?

ts
optional langPrefix: string;

Defined in: renderer.ts:33

CSS language class prefix for fenced blocks. Can be useful for external highlighters.

Default

ts
'language-'

Inherited from

RenderOptions.langPrefix


linkify?

ts
optional linkify: boolean;

Defined in: core.ts:48

Set true to autoconvert URL-like text to links.

Default

ts
false

maxNesting?

ts
optional maxNesting: number;

Defined in: core.ts:69

Internal protection, recursion limit


quotes?

ts
optional quotes: string | string[];

Defined in: core.ts:64

Double + single quotes replacement pairs, when typographer enabled and smartquotes on. For example, you can use '«»„“' for Russian, '„“‚‘' for German, and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).

Default

ts
'“”‘’'

typographer?

ts
optional typographer: boolean;

Defined in: core.ts:55

Set true to enable some language-neutral replacement + quotes beautification (smartquotes).

Default

ts
false

xhtmlOut?

ts
optional xhtmlOut: boolean;

Defined in: renderer.ts:20

Set true to add '/' when closing single tags (<br />). This is needed only for full CommonMark compatibility. In real world you will need HTML output.

Default

ts
false

Inherited from

RenderOptions.xhtmlOut

Released under the MIT License.