Skip to main content
Module

x/dendron_exports/deps/micromark.ts>CompileOptions

Export your Dendron vault into SSG compatible markdown
Latest
interface CompileOptions
import { type CompileOptions } from "https://deno.land/x/dendron_exports@v0.2.2/deps/micromark.ts";

Compile options.

Properties

optional
allowDangerousHtml: boolean | null | undefined

Whether to allow (dangerous) HTML (boolean, default: false).

The default is false, which still parses the HTML according to CommonMark but shows the HTML as text instead of as elements.

Pass true for trusted content to get actual HTML elements.

optional
allowDangerousProtocol: boolean | null | undefined

Whether to allow dangerous protocols in links and images (boolean, default: false).

The default is false, which drops URLs in links and images that use dangerous protocols.

Pass true for trusted content to support all protocols.

URLs that have no protocol (which means it’s relative to the current page, such as ./some/page.html) and URLs that have a safe protocol (for images: http, https; for links: http, https, irc, ircs, mailto, xmpp), are safe. All other URLs are dangerous and dropped.

optional
defaultLineEnding: LineEnding | null | undefined

Default line ending to use when compiling to HTML, for line endings not in value.

Generally, micromark copies line endings (\r, \n, \r\n) in the markdown document over to the compiled HTML. In some cases, such as > a, CommonMark requires that extra line endings are added: <blockquote>\n<p>a</p>\n</blockquote>.

To create that line ending, the document is checked for the first line ending that is used. If there is no line ending, defaultLineEnding is used. If that isn’t configured, \n is used.

optional
htmlExtensions: Array<HtmlExtension> | null | undefined

Array of HTML extensions (default: []).