Skip to content

Build your personal knowledge base with Trilium Notes

server-esm: Fix marked import issue

Elian Doran27c296fa6cf5
diff --git a/src/services/import/markdown.ts b/src/services/import/markdown.ts
index b5a022d1e6..e3b4d6aa21 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