From 32d7c8113f237228d349572d4f4f151d17935ee3 Mon Sep 17 00:00:00 2001 From: Andrii Ieroshenko Date: Tue, 30 Jan 2024 18:17:21 -0800 Subject: [PATCH] use rmRegistry typesetter --- packages/jupyter-ai/src/components/rendermime-markdown.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/jupyter-ai/src/components/rendermime-markdown.tsx b/packages/jupyter-ai/src/components/rendermime-markdown.tsx index ea9f7f2af..ff513be52 100644 --- a/packages/jupyter-ai/src/components/rendermime-markdown.tsx +++ b/packages/jupyter-ai/src/components/rendermime-markdown.tsx @@ -24,10 +24,10 @@ function RendermimeMarkdownBase(props: RendermimeMarkdownProps): JSX.Element { const model = props.rmRegistry.createModel({ data: { [MD_MIME_TYPE]: props.markdownStr } }); + const renderer = props.rmRegistry.createRenderer(MD_MIME_TYPE); await renderer.renderModel(model); - const typesetter = new MathJaxTypesetter(); - typesetter.typeset(renderer.node); + props.rmRegistry.latexTypesetter?.typeset(renderer.node); setRenderedContent(renderer.node); // Attach CopyButton to each
 block