Render KaTeX errors in notebooks

Fixes #122413
This commit is contained in:
Matt Bierner 2021-05-06 17:10:10 -07:00
parent 96b553a125
commit 40321932fc
No known key found for this signature in database
GPG key ID: 099C331567E11888
2 changed files with 10 additions and 2 deletions

View file

@ -10,9 +10,17 @@ const link = document.createElement('link');
link.rel = 'stylesheet';
link.classList.add('markdown-style');
link.href = styleHref;
document.head.append(link);
const style = document.createElement('style');
style.classList.add('markdown-style');
style.textContent = `
.katex-error {
color: var(--vscode-editorError-foreground);
}
`;
document.head.append(style);
const katex = require('@iktakahiro/markdown-it-katex');
export function extendMarkdownIt(md: markdownIt.MarkdownIt) {

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#e88925a7cb3fd593a14ed117fb43627c4ba910b6"
resolved "https://github.com/mjbvz/markdown-it-katex.git#2bf0b89c6c22ef0b585f55ccab66d1f7c5356bea"
dependencies:
katex "^0.13.0"