|
|
@ -52,7 +52,7 @@ router.post('/micropub', async (ctx, next) => { |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
function readMarkdown(md) { |
|
|
function readMarkdown(md) { |
|
|
const parsed = parse(value); |
|
|
|
|
|
|
|
|
const parsed = parse(md); |
|
|
const codeBlocks = parsed.children.filter((block) => block.type === "code"); |
|
|
const codeBlocks = parsed.children.filter((block) => block.type === "code"); |
|
|
const blocks = { |
|
|
const blocks = { |
|
|
html: codeBlocks.filter((block) => block.lang === "html"), |
|
|
html: codeBlocks.filter((block) => block.lang === "html"), |
|
|
|