From 42662ae3db2a2f2366942ab7d68f9441e03b29bb Mon Sep 17 00:00:00 2001 From: Dawid Rycerz Date: Tue, 13 Jan 2026 19:06:55 +0100 Subject: Add full content render for rss feed --- src/utils/markdown.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/utils/markdown.ts (limited to 'src/utils/markdown.ts') diff --git a/src/utils/markdown.ts b/src/utils/markdown.ts new file mode 100644 index 0000000..946d8d8 --- /dev/null +++ b/src/utils/markdown.ts @@ -0,0 +1,11 @@ +import { marked } from "marked"; + +marked.setOptions({ + breaks: true, + gfm: true, +}); + +export function markdownToHtml(markdown: string): string { + const html = marked.parse(markdown); + return typeof html === "string" ? html : ""; +} -- cgit v1.2.3