diff --git a/packages/docsify-server-renderer/index.js b/packages/docsify-server-renderer/index.js index 06aef617b..b07e40c07 100644 --- a/packages/docsify-server-renderer/index.js +++ b/packages/docsify-server-renderer/index.js @@ -74,7 +74,9 @@ export default class Renderer { } _renderHtml (match, content) { - return this.html = this.html.replace(new RegExp(``, 'g'), content) + this.html = this.html.replace(new RegExp(``, 'g'), content) + + return this.html } _render (path, type) { @@ -83,8 +85,8 @@ export default class Renderer { switch (type) { case 'sidebar': - html = this.compiler.sidebar(html, maxLevel) - + `` break diff --git a/src/core/render/index.js b/src/core/render/index.js index 652d4fc19..72244fd6d 100644 --- a/src/core/render/index.js +++ b/src/core/render/index.js @@ -79,7 +79,7 @@ export function renderMixin (proto) { } proto._renderSidebar = function (text) { - const { maxLevel, subMaxLevel, autoHeader, loadSidebar } = this.config + const { maxLevel, subMaxLevel, loadSidebar } = this.config this._renderTo('.sidebar-nav', this.compiler.sidebar(text, maxLevel)) const activeEl = getAndActive(this.router, '.sidebar-nav', true, true) @@ -171,7 +171,7 @@ export function initRender (vm) { const id = config.el || '#app' const navEl = dom.find('nav') || dom.create('nav') - let el = dom.find(id) + const el = dom.find(id) let html = '' let navAppendToTarget = dom.body