From 27c296fa6cf563ad81f00300324d898826cf9eec Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 19 Jul 2024 00:02:39 +0300 Subject: [PATCH] server-esm: Fix marked import issue --- src/services/import/markdown.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/import/markdown.ts b/src/services/import/markdown.ts index b5a022d1e..e3b4d6aa2 100644 --- a/src/services/import/markdown.ts +++ b/src/services/import/markdown.ts @@ -1,11 +1,11 @@ "use strict"; -import marked from "marked"; +import { parse } from "marked"; import htmlSanitizer from "../html_sanitizer.js"; import importUtils from "./utils.js"; function renderToHtml(content: string, title: string) { - const html = marked.parse(content, { + const html = parse(content, { async: false }) as string; const h1Handled = importUtils.handleH1(html, title); // h1 handling needs to come before sanitization