diff --git a/lib/routes/twitter/utils.ts b/lib/routes/twitter/utils.ts index bccaa0ee5..337da7765 100644 --- a/lib/routes/twitter/utils.ts +++ b/lib/routes/twitter/utils.ts @@ -359,9 +359,10 @@ const ProcessFeed = (ctx, { data = [] }, params = {}) => { } description += item.full_text; + // 从 description 提取 话题作为 category,放在此处是为了避免 匹配到 quote 中的 # 80808030 颜色字符 + const category = description.match(/(\s)?(#[^\s;<]+)/g)?.map((e) => e?.match(/#([^\s<]+)/)?.[1]); description += img; description += quote; - const category = description.match(/(\s)?(#[^\s<]+)/g)?.map((e) => e?.match(/#([^\s<]+)/)?.[1]); if (readable) { description += `
`; }