fix: 简阅(simpread) 占位字符去除

This commit is contained in:
zytomorrow
2021-01-08 13:20:07 +08:00
parent 7aec48e8d0
commit 92ddaf6178
+3 -1
View File
@@ -45,11 +45,13 @@ module.exports = async (ctx) => {
.find('li')
.map((index, item) => {
const level = $(item).find('span').attr('class');
const text = $(item).find('span').html();
$(item).find('span').remove();
if (level !== undefined) {
if (level.indexOf('empty') !== -1) {
$(item).wrap('<ul></ul>');
} else {
$(item).find('span').append('<br/>');
$(item).prepend(`<b>${text}: </b>`);
}
}
return {};