server-esm: Fix marked import issue

This commit is contained in:
Elian Doran 2024-07-19 00:02:39 +03:00
parent fb7c0fdb4c
commit 27c296fa6c
No known key found for this signature in database

View File

@ -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