diff --git a/lib/index.js b/lib/index.js index 42b3c47..f8bf920 100644 --- a/lib/index.js +++ b/lib/index.js @@ -116,14 +116,13 @@ module.exports = (opts, ctx) => { spinner.start(`Fetching ${chalk.cyan(title)} ... `) const { status, data } = await yuque.getPage(slug) - const format = data.format - debug('status = ', status, 'format = ', format) + debug('status = ', status) let postContent if (status && status === 404) { postContent = `# ${title}\n > 此文档尚未创建` } else { - if (useMarkdown || format === 'markdown') { + if (useMarkdown || data.format === 'markdown') { postContent = data.body } else { postContent = prettify(data.body_html)