File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -138,11 +138,13 @@ const rssFilePath = `./feeds/rss/${year}-${week}.json`;
138
138
139
139
let mdListContent = "";
140
140
uniqueArray.forEach(post => {
141
- mdListContent += `- [${post.title} ](${post.url} ) [#${post.id} ](https:// github.com/ jaywcjlove/ quick- rss/ issues/ ${post.id} ) [@${post.author.name} ](https:// github.com/ ${post.author.name} )\n`;
141
+ let rssurl = post.url.replace(/(^[\n\s\r]+)|([\n\s\r]+$)/, '')
142
+ let rsstitle = post.title.replace(/(^[\n\s\r]+)|([\n\s\r]+$)/, '')
143
+ mdListContent += `- [${rsstitle} ](${rssurl} ) [#${post.id} ](https:// github.com/ jaywcjlove/ quick- rss/ issues/ ${post.id} ) [@${post.author.name} ](https:// github.com/ ${post.author.name} )\n`;
142
144
feed.addItem({
143
- title: post.title ,
145
+ title: rsstitle ,
144
146
id: post.id,
145
- link: post.url ,
147
+ link: rssurl ,
146
148
image: post.image,
147
149
content: post.content_html,
148
150
description: post.summary,
You can’t perform that action at this time.
0 commit comments