From 0d59ee939fac6b0a8980c0e24d2da5f654227052 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Tue, 28 Feb 2017 22:00:53 +0800 Subject: [PATCH] fix(render): Toc rendering error, fixed #106 --- src/core/render/compiler.js | 3 ++- src/core/render/index.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/render/compiler.js b/src/core/render/compiler.js index fbc3f083c..78250f257 100644 --- a/src/core/render/compiler.js +++ b/src/core/render/compiler.js @@ -106,8 +106,9 @@ export function sidebar (text, level) { html = markdown(text) html = html.match(/]*>([\s\S]+)<\/ul>/g)[0] } else { - const tree = genTree(toc, level) + const tree = cacheTree[currentPath] || genTree(toc, level) html = treeTpl(tree, '