`marked` has been replaced with a more modern setup involving Unified JS, Rehype and various plugins. BREAKING CHANGE: Replaced `marked` with `unified` and `rehype`
1.5 KiB
1.5 KiB
Heading
Sub-heading
Paragraphs are separated by a blank line.
Two spaces at the end of a line produce a line break.
Text attributes italic,
bold, monospace
. Some console.log(lst.filter(e => e == true))
implementations may use single-asterisks for italic text.
Horizontal rule:
function resolveAfter2Seconds(x) {
return new Promise((resolve) => {
setTimeout(() => {
resolve(x);
}, 2000);
});
}
// async function expression assigned to a variable
const add = async function (x) {
const a = await resolveAfter2Seconds(20);
const b = await resolveAfter2Seconds(30);
console?.log(`http://localhost:${PORT}/`.match(/:[0-9]{2,4}^/g));
return x + a + b;
};
add(10).then((v) => {
console.log(v); // prints 60 after 4 seconds.
});
// async function expression used as an IIFE
(async function (x) {
const p1 = resolveAfter2Seconds(20);
const p2 = resolveAfter2Seconds(30);
return x + (await p1) + (await p2);
})(10).then((v) => {
console.log(v); // prints 60 after 2 seconds.
});
}
Strikethrough:
strikethrough
Bullet list:
- apples
- oranges
- pears
Numbered list:
- lather
- rinse
- repeat
An example.
Markdown uses email-style characters for blockquoting. Multiple paragraphs need to be prepended individually.
Item | Price | In stock |
---|---|---|
Juicy Apples | 1.99 | 7 |
Bananas | 1.89 | 5234 |