fix(route): 修复 twitter 路由会匹配到 # 开头的颜色字符的问题 (#15740)
This commit is contained in:
parent
73c9e1fdfd
commit
363bcf329d
|
|
@ -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 += `<br clear='both' /><div style='clear: both'></div>`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue