Switch to published markdown-it-katex package (#172956)

Fixes #172945
This commit is contained in:
Matt Bierner 2023-01-31 13:02:35 -08:00 committed by GitHub
parent 01ec7fdbe1
commit 845a39b5ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 9 deletions

View file

@ -45,7 +45,7 @@ export async function activate(ctx: RendererContext<void>) {
styleTemplate.content.appendChild(link);
document.head.appendChild(styleTemplate);
const katex = require('@iktakahiro/markdown-it-katex');
const katex = require('@vscode/markdown-it-katex');
const macros = {};
markdownItRenderer.extendMarkdownIt((md: markdownIt.MarkdownIt) => {
return md.use(katex, {

View file

@ -90,7 +90,7 @@
"build-notebook": "node ./esbuild"
},
"dependencies": {
"@iktakahiro/markdown-it-katex": "mjbvz/markdown-it-katex"
"@vscode/markdown-it-katex": "^1.0.0"
},
"devDependencies": {
"@types/markdown-it": "^0.0.0",

View file

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

View file

@ -2,12 +2,6 @@
# yarn lockfile v1
"@iktakahiro/markdown-it-katex@mjbvz/markdown-it-katex":
version "4.0.1"
resolved "https://codeload.github.com/mjbvz/markdown-it-katex/tar.gz/88f39cedd35bba713ebe26bdc153b378b17fde24"
dependencies:
katex "^0.16.2"
"@types/markdown-it@^0.0.0":
version "0.0.0"
resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.0.tgz#8f6acaa5e3245e275f684e95deb3e518d1c6ab16"
@ -18,6 +12,13 @@
resolved "https://registry.yarnpkg.com/@types/vscode-notebook-renderer/-/vscode-notebook-renderer-1.72.0.tgz#8943dc3cef0ced2dfb1e04c0a933bd289e7d5199"
integrity sha512-5iTjb39DpLn03ULUwrDR3L2Dy59RV4blSUHy0oLdQuIY11PhgWO4mXIcoFS0VxY1GZQ4IcjSf3ooT2Jrrcahnw==
"@vscode/markdown-it-katex@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@vscode/markdown-it-katex/-/markdown-it-katex-1.0.0.tgz#c0b35df95be90f79ed92c8bae77a764e96dde5c4"
integrity sha512-J0jtR3iI1VTSX1fadhNRB6vQUh792+5D7TW6XhJuktgG9+4ZXtWHwFOttvQVw7XKMB7RiPBdGV4cLzEuYV6bSg==
dependencies:
katex "^0.16.2"
commander@^8.0.0:
version "8.3.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66"