Skip to content

Commit 27ef171

Browse files
committed
fix: ensure marked.parse is used synchronously
1 parent 01ca4c5 commit 27ef171

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/app/feed/route.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ export const revalidate = 60;
1212
// Convert markdown to HTML for RSS feeds
1313
function markdownToHtml(markdown: string): string {
1414
try {
15-
return marked.parse(markdown);
15+
// Use marked.parse with synchronous option to ensure it returns a string
16+
return marked.parse(markdown, { async: false }) as string;
1617
} catch (error) {
1718
console.warn("Failed to convert markdown to HTML:", error);
1819
return markdown;

0 commit comments

Comments
 (0)