From 6da2dbb005659cf439cb863e4dfb4f4087838d08 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 21 Oct 2023 22:01:04 -0400 Subject: [PATCH] Fixing news preview. --- src/shared/components/news.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/components/news.tsx b/src/shared/components/news.tsx index ed5e434..f5f9c99 100644 --- a/src/shared/components/news.tsx +++ b/src/shared/components/news.tsx @@ -36,6 +36,9 @@ function titleToUrl(title: string): string { function previewMarkdown(markdown: string): string { return markdown .replace(/#/g, "") + .split(/\n/g) + .slice(3) + .join("\n") .replace(/[\n\r]/g, " ") .slice(0, 100) .concat("...");