Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Nov 27, 2022
1 parent 4f9ab99 commit 38fe0d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/hexo/post.js
Expand Up @@ -383,7 +383,8 @@ class Post {
if (typeof data.disableNunjucks === 'boolean') disableNunjucks = data.disableNunjucks;

const cacheObj = new PostRenderEscape();
const isPost = ['html', 'htm'].includes(ctx.render.getOutput(data.source));
// data.source does not exist when tag plugins call the markdown renderer
const isPost = !data.source || ['html', 'htm'].includes(ctx.render.getOutput(data.source));

if (!isPost) {
return promise.then(content => {
Expand Down

0 comments on commit 38fe0d2

Please sign in to comment.