Skip to content

Commit

Permalink
use rmRegistry typesetter
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-i committed Jan 31, 2024
1 parent 9eca8fe commit 32d7c81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/jupyter-ai/src/components/rendermime-markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <pre> block
Expand Down

0 comments on commit 32d7c81

Please sign in to comment.