fix missing librairies

This commit is contained in:
2024-04-10 16:08:09 +02:00
parent 3df57c1569
commit 680513a3a6
2 changed files with 6 additions and 3 deletions

View File

@@ -125,7 +125,7 @@ const preprocess = (markdown: string): string => {
}
const postprocess = (html: string): string => {
DOMPurify.addHook('afterSanitizeAttributes', (node) => {
DOMPurify.addHook('afterSanitizeAttributes', (node: any) => {
if ('target' in node) {
node.setAttribute('target', '_blank');
node.setAttribute('rel', 'noopener noreferrer');
@@ -140,7 +140,7 @@ const postprocess = (html: string): string => {
const convertMarkdownToHtml = (markdown: string): string => {
marked.use({'hooks': {postprocess, preprocess}});
const rawHtml = marked(markdown);
const rawHtml = marked(markdown) as string;
return rawHtml;
};