1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Fix plaintext markdown converter

This commit is contained in:
Chocobozzz 2022-02-04 10:31:54 +01:00
parent 457c83486e
commit c68e2b2d22
No known key found for this signature in database
GPG key ID: 583A612D890159BE
7 changed files with 104 additions and 27 deletions

View file

@ -1,6 +1,6 @@
import express from 'express'
import Feed from 'pfeed'
import { mdToPlainText, toSafeHtml } from '@server/helpers/markdown'
import { mdToOneLinePlainText, toSafeHtml } from '@server/helpers/markdown'
import { getServerActor } from '@server/models/application/application'
import { getCategoryLabel } from '@server/models/video/formatter/video-format-utils'
import { VideoInclude } from '@shared/models'
@ -236,7 +236,7 @@ function initFeed (parameters: {
return new Feed({
title: name,
description: mdToPlainText(description),
description: mdToOneLinePlainText(description),
// updated: TODO: somehowGetLatestUpdate, // optional, default = today
id: webserverUrl,
link: webserverUrl,
@ -299,7 +299,7 @@ function addVideosToFeed (feed, videos: VideoModel[]) {
title: video.name,
id: video.url,
link: WEBSERVER.URL + video.getWatchStaticPath(),
description: mdToPlainText(video.getTruncatedDescription()),
description: mdToOneLinePlainText(video.getTruncatedDescription()),
content: toSafeHtml(video.description),
author: [
{