chore(vscode): update to 1.56.0
This commit is contained in:
@@ -4,24 +4,17 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import type * as markdownIt from 'markdown-it';
|
||||
|
||||
declare const extendMarkdownIt: undefined | (
|
||||
(f: (md: markdownIt.MarkdownIt) => void) => void
|
||||
);
|
||||
|
||||
const styleHref = (document.currentScript as any).src.replace(/katex.js$/, 'katex.min.css');
|
||||
const styleHref = import.meta.url.replace(/katex.js$/, 'katex.min.css');
|
||||
|
||||
const link = document.createElement('link');
|
||||
link.rel = 'stylesheet';
|
||||
link.classList.add('markdown-style');
|
||||
link.href = styleHref;
|
||||
|
||||
document.head.append(link);
|
||||
|
||||
(function () {
|
||||
const katex = require('@iktakahiro/markdown-it-katex');
|
||||
if (typeof extendMarkdownIt !== 'undefined') {
|
||||
const katex = require('@iktakahiro/markdown-it-katex');
|
||||
|
||||
extendMarkdownIt((md: markdownIt.MarkdownIt) => {
|
||||
md.use(katex);
|
||||
});
|
||||
}
|
||||
}());
|
||||
export function extendMarkdownIt(md: markdownIt.MarkdownIt) {
|
||||
return md.use(katex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user