去掉标题空格和换行 (#547)
This commit is contained in:
parent
7e8eadd203
commit
1b8c46cce5
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue