Skip to content

Commit

Permalink
Fix notion lib issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-gordon committed Jan 12, 2025
1 parent 78b0f59 commit 253fcc3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/_lib/_notion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,15 @@ export async function getPostHtmlFromId(id: string) {
type: "html",
parent: videoHtml,
children: [],
blockId: block.blockId,
};
}
}
return block;
});

const mdString = n2m.toMarkdownString(mdblocks);
const html = marked(mdString);
const html = marked(mdString.parent);
return html;
}

Expand All @@ -95,6 +96,7 @@ Takes a block in the format
and returns an HTML <video /> element with audio muted and autoplay, looping enabled
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function videoBlockToHtml(block: any) {
const markdown = block.parent;
const url = markdown.match(/\(([^)]+)\)/)[1];
Expand Down

0 comments on commit 253fcc3

Please sign in to comment.