Persist KaTeX macros across render calls (#129747)

* Use KaTeX "globalGroup" for markdown rendering

* Use KaTeX "globalGroup" for markdown rendering
This commit is contained in:
Christopher Yeh 2021-08-05 14:37:49 -07:00 committed by GitHub
parent a4eb4d6884
commit 4a69c3dda7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -45,6 +45,6 @@ export async function activate(ctx: {
const katex = require('@iktakahiro/markdown-it-katex');
markdownItRenderer.extendMarkdownIt((md: markdownIt.MarkdownIt) => {
return md.use(katex);
return md.use(katex, {'globalGroup': true});
});
}

View file

@ -24,7 +24,7 @@ export function activate(context: vscode.ExtensionContext) {
extendMarkdownIt(md: any) {
if (isEnabled()) {
const katex = require('@iktakahiro/markdown-it-katex');
return md.use(katex);
return md.use(katex, {'globalGroup': true});
}
return md;
}