Skip to content

Commit 995097e

Browse files
fix the issue that code blocks in markdown are rendered as placeholder after disabling nunjucks
1 parent 1b432c3 commit 995097e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/hexo/post.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,12 @@ Post.prototype.render = function(source, data = {}, callback) {
270270
engine: data.engine,
271271
toString: true,
272272
onRenderEnd(content) {
273-
if (disableNunjucks) return content;
274273
// Replace cache data with real contents
275274
data.content = cacheObj.loadContent(content);
276275

276+
// Return content after replace the placeholders
277+
if (disableNunjucks) return data.content;
278+
277279
// Render with Nunjucks
278280
return tag.render(data.content, data);
279281
}

0 commit comments

Comments
 (0)