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:
parent
457c83486e
commit
c68e2b2d22
7 changed files with 104 additions and 27 deletions
|
@ -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: [
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue