({
take: [
{ type: "text", key: "markdown", label: "Markdown code" },
{
type: "toggle",
key: "headerIds",
label: "Add Header IDs",
detail: "Include an `id` attribute on headings (h1, h2, h3, etc).",
},
{
type: "toggle",
key: "gfm",
label: "GitHub Flavored Markdown",
detail: "Use approved GitHub Flavored Markdown (GFM) specification.",
},
{
type: "toggle",
key: "breaks",
label: "Line Breaks",
detail: "Add `<br>` on a single line break. Requires `gfm` be true.",
},
{
type: "toggle",
key: "smartLists",
label: "Smart Lists",
detail: "Use smarter list behavior than those found in `markdown.pl`.",
},
{
type: "toggle",
key: "smartypants",
label: "Smartypants",
detail: 'Use "smart" typographic punctuation for quotes and dashes.',
},
{
type: "toggle",
key: "xhtml",
label: "XHTML",
detail: "Use self-closing tags for void elements, like `<br/>`.",
},
{
type: "toggle",
key: "pedantic",
label: "Pedantic",
detail: "Conform to original `markdown.pl`. Disables GFM.",
},
{
type: "import",
value: "https://cdn.jsdelivr.net/npm/marked@2.1.3/marked.min.js",
},
],
make: ({ markdown, ...options }) => ({
type: "code",
value: marked(markdown, options),
}),
})