INNER CODE UNIT · TypeScript
activate
CloudWise-OpenSource/FlyFish · lcapCodeServer/macos/lib/vscode/extensions/markdown-language-features/notebook/index.ts:8
export async function activate(ctx: {
dependencies: ReadonlyArray<{ entrypoint: string }>
}) {
let markdownIt = new MarkdownIt({
html: true
});
// Should we load the deps before this point?
// Also could we await inside `renderMarkup`?
await Promise.all(ctx.dependencies.map(async (dep) => {
try {
const api = await import(dep.entrypoint);
if (api?.extendMarkdownIt) {
markdownIt = api.extendMarkdownIt(markdownIt);
}
} catch (e) {
console.error('Could not load markdown entryPoint', e);
}