Update processJsonPost.js to remove newlines from selftext_preview

This commit is contained in:
redmt 2022-06-10 15:46:28 +02:00
parent 319fa35d5f
commit 6328e41bcf
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ async function processJsonPost(json, parsed, user_preferences) {
images: null, images: null,
crosspost: false, crosspost: false,
selftext: unescape(post.selftext_html), selftext: unescape(post.selftext_html),
selftext_preview: post.selftext.substr(0, 120), selftext_preview: post.selftext.substr(0, 120).replace(/\n/g, ' '),
poll_data: post.poll_data, poll_data: post.poll_data,
link_flair: link_flair:
user_preferences.flairs != 'false' ? await formatLinkFlair(post) : '', user_preferences.flairs != 'false' ? await formatLinkFlair(post) : '',