feat: polish up the format of nyt (again) (#6046)

This commit is contained in:
Enoch Ma
2020-10-30 09:14:46 +00:00
committed by GitHub
parent e2aa7c2347
commit a48022af2b
+4 -1
View File
@@ -82,10 +82,13 @@ module.exports = async (ctx) => {
const result = utils.ProcessFeed(response, hasEnVersion);
// Match 感谢|謝.*?cn.letters@nytimes.com。
const ending = /感(&#x8C22|&#x8B1D);.*?cn\.letters@nytimes\.com。/g;
const matching = '<div class="article-paragraph">';
const formatted = '<p></p>' + matching;
single.description = result.description.split(matching).join(formatted);
single.description = result.description.replace(ending, '').split(matching).join(formatted);
if (hasEnVersion) {
single.title = result.title;