chore(deps-dev): bump prettier from 1.19.1 to 2.0.2

This commit is contained in:
DIYgod
2020-04-02 21:21:46 +08:00
parent 27e4a7c151
commit 0e7b14e718
471 changed files with 1237 additions and 4457 deletions

View File

@@ -12,20 +12,12 @@ module.exports = async (ctx) => {
const list = $('a.list-group-item')
.slice(0, 10)
.filter((i, e) => $(e).find('h4.media-heading i').length === 0)
.map(function() {
.map(function () {
const info = {
title: $(this)
.find('h4.media-heading')
.text()
.trim(),
author: $(this)
.find('.text-500')
.text(),
title: $(this).find('h4.media-heading').text().trim(),
author: $(this).find('.text-500').text(),
link: $(this).attr('href'),
date: $(this)
.find('p.pull-right.media-date strong')
.text()
.trim(),
date: $(this).find('p.pull-right.media-date strong').text().trim(),
};
return info;
})
@@ -43,13 +35,7 @@ module.exports = async (ctx) => {
const response = await got.get(itemUrl);
const $ = cheerio.load(response.data);
const description =
$('#question-preview')
.html()
.trim() +
$('.article-body')
.html()
.trim();
const description = $('#question-preview').html().trim() + $('.article-body').html().trim();
const single = {
title: info.title,