去掉标题空格和换行 (#547)

This commit is contained in:
Kevin 2018-08-27 23:02:57 +08:00 committed by DIYgod
parent 7e8eadd203
commit 1b8c46cce5
1 changed files with 2 additions and 2 deletions

View File

@ -17,14 +17,14 @@ module.exports = async (ctx) => {
titleTags.find('span').remove();
const platform = $('.we-localnav__title__product').text();
const title = `${titleTags.text()} for ${platform === 'App Store' ? 'iOS' : 'macOS'} ${country === 'cn' ? '更新' : 'Update'} `;
const title = `${titleTags.text().trim()} for ${platform === 'App Store' ? 'iOS' : 'macOS'} ${country === 'cn' ? '更新' : 'Update'} `;
const item = {};
$('.whats-new').each(function() {
const version = $('.whats-new__latest__version')
.text()
.split(' ')[1];
item.title = `${titleTags.text()} ${version}`;
item.title = `${titleTags.text().trim()} ${version}`;
item.description = $('.whats-new__content .we-truncate').html();
item.link = url;
item.guid = id + version;