Skip to content

Commit

Permalink
fix the issue that code blocks in markdown are rendered as placeholde…
Browse files Browse the repository at this point in the history
…r after disabling nunjucks
  • Loading branch information
think-in-universe committed Jun 4, 2019
1 parent 1b432c3 commit 995097e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/hexo/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,12 @@ Post.prototype.render = function(source, data = {}, callback) {
engine: data.engine,
toString: true,
onRenderEnd(content) {
if (disableNunjucks) return content;
// Replace cache data with real contents
data.content = cacheObj.loadContent(content);

// Return content after replace the placeholders
if (disableNunjucks) return data.content;

// Render with Nunjucks
return tag.render(data.content, data);
}
Expand Down

0 comments on commit 995097e

Please sign in to comment.