mirror of
https://github.com/LemmyNet/joinlemmy-site.git
synced 2024-11-25 13:51:17 +00:00
Fixing news preview.
This commit is contained in:
parent
bfadf4ebfe
commit
6da2dbb005
1 changed files with 3 additions and 0 deletions
|
@ -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("...");
|
||||
|
|
Loading…
Reference in a new issue