import { type CompileOptions } from "https://deno.land/x/dendron_exports@v0.1.2/deps/micromark.ts";
Compile options.
Properties
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.
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.
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.
Array of HTML extensions (default: []
).