Skip to content
Permalink
Browse files

feat: use page's default format

  • Loading branch information...
ulivz committed Feb 8, 2019
1 parent 475448b commit 7b4186749830b3fc96a3bf7291b0f338424334c4
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/index.js
@@ -116,13 +116,14 @@ module.exports = (opts, ctx) => {
spinner.start(`Fetching ${chalk.cyan(title)} ... `)

const { status, data } = await yuque.getPage(slug)
debug('status', status)
const format = data.format
debug('status = ', status, 'format = ', format)

let postContent
if (status && status === 404) {
postContent = `# ${title}\n > 此文档尚未创建`
} else {
if (useMarkdown) {
if (useMarkdown || format === 'markdown') {
postContent = data.body
} else {
postContent = prettify(data.body_html)

0 comments on commit 7b41867

Please sign in to comment.
You can’t perform that action at this time.