fix: marked usage errors

This commit is contained in:
Manx98
2026-03-26 23:02:29 +08:00
committed by lyingbug
parent 380f5d9405
commit 5c0b265ea7
4 changed files with 5 additions and 9 deletions
+1 -1
View File
@@ -197,7 +197,7 @@ async function renderMarkdown(blob: Blob) {
gfm: true,
});
const renderer = new marked.Renderer();
renderer.code = function (text: string, lang?: string) {
renderer.code = function ({text, lang}) {
let highlighted = '';
if (lang && hljs.getLanguage(lang)) {
try { highlighted = hljs.highlight(text, { language: lang }).value; }