Enable rendering of bare math blocks in notebooks

Fixes #133390

Adds support for math blocks that just start with `\begin` instead of being wrapped in dollar signs
This commit is contained in:
Matt Bierner 2021-10-11 19:08:29 -07:00
parent 9e548239ea
commit 8b688986b7
No known key found for this signature in database
GPG key ID: 099C331567E11888
2 changed files with 5 additions and 2 deletions

View file

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

View file

@ -4,7 +4,7 @@
"@iktakahiro/markdown-it-katex@https://github.com/mjbvz/markdown-it-katex.git":
version "4.0.1"
resolved "https://github.com/mjbvz/markdown-it-katex.git#2bf0b89c6c22ef0b585f55ccab66d1f7c5356bea"
resolved "https://github.com/mjbvz/markdown-it-katex.git#820d9025ad84937eb3f9f7efbc1be7595e20b19f"
dependencies:
katex "^0.13.0"