Use @types/vscode-notebook-renderer

This commit is contained in:
Matt Bierner
2021-08-27 17:21:53 -07:00
parent 3ff1222366
commit 0ec3d48b70
6 changed files with 18 additions and 6 deletions

View File

@@ -6,12 +6,13 @@
const MarkdownIt = require('markdown-it');
import * as DOMPurify from 'dompurify';
import type * as markdownIt from 'markdown-it';
import type { RendererContext } from 'vscode-notebook-renderer';
const sanitizerOptions: DOMPurify.Config = {
ALLOWED_TAGS: ['a', 'button', 'blockquote', 'code', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'img', 'input', 'label', 'li', 'p', 'pre', 'select', 'small', 'span', 'strong', 'textarea', 'ul', 'ol'],
};
export function activate(ctx: { workspace: { isTrusted: boolean } }) {
export function activate(ctx: RendererContext<void>) {
let markdownIt = new MarkdownIt({
html: true
});