Fixing news preview.

This commit is contained in:
Dessalines 2023-10-21 22:01:04 -04:00
parent bfadf4ebfe
commit 6da2dbb005

View file

@ -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("...");