From 8b688986b7c0dc216e3600386c9f53dcd59dfe35 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 11 Oct 2021 19:08:29 -0700 Subject: [PATCH] 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 --- extensions/markdown-math/notebook/katex.ts | 5 ++++- extensions/markdown-math/yarn.lock | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/extensions/markdown-math/notebook/katex.ts b/extensions/markdown-math/notebook/katex.ts index cc076db5201..f6b683ffcb6 100644 --- a/extensions/markdown-math/notebook/katex.ts +++ b/extensions/markdown-math/notebook/katex.ts @@ -44,6 +44,9 @@ export async function activate(ctx: RendererContext) { 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, + }); }); } diff --git a/extensions/markdown-math/yarn.lock b/extensions/markdown-math/yarn.lock index ac52779ca6e..afbc51221af 100644 --- a/extensions/markdown-math/yarn.lock +++ b/extensions/markdown-math/yarn.lock @@ -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"