From a48022af2b600a9ba92b84db4754b0f6f8b1f610 Mon Sep 17 00:00:00 2001 From: Enoch Ma Date: Fri, 30 Oct 2020 17:14:46 +0800 Subject: [PATCH] feat: polish up the format of nyt (again) (#6046) --- lib/routes/nytimes/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/routes/nytimes/index.js b/lib/routes/nytimes/index.js index 3e47942ab1..f42b2922f6 100644 --- a/lib/routes/nytimes/index.js +++ b/lib/routes/nytimes/index.js @@ -82,10 +82,13 @@ module.exports = async (ctx) => { const result = utils.ProcessFeed(response, hasEnVersion); + // Match 感谢|謝.*?cn.letters@nytimes.com。 + const ending = /感(谢|謝);.*?cn\.letters@nytimes\.com。/g; + const matching = '
'; const formatted = '

' + 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;