mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix(route): infoq 部分文章内容解析错误导致无法生成订阅文件 (#10376)
This commit is contained in:
@@ -58,8 +58,12 @@ const parseToSimpleTexts = (content) =>
|
||||
}
|
||||
},
|
||||
blockquote: () => {
|
||||
const text = parseToSimpleText(i.content);
|
||||
return `<blockquote>${text}</blockquote>`;
|
||||
if (i.content) {
|
||||
const text = parseToSimpleText(i.content);
|
||||
return `<blockquote>${text}</blockquote>`;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
image: () => {
|
||||
const img = i.attrs.src;
|
||||
@@ -76,7 +80,7 @@ const parseToSimpleTexts = (content) =>
|
||||
},
|
||||
link: () => {
|
||||
const href = i.attrs.href;
|
||||
const text = parseToSimpleText(i.content);
|
||||
const text = i.content ? parseToSimpleText(i.content) : '';
|
||||
return `<a href="${href}">${text}</a>"`;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user