Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed May 29, 2017
1 parent eba1c98 commit 1f4514d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions packages/docsify-server-renderer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ export default class Renderer {
}

_renderHtml (match, content) {
return this.html = this.html.replace(new RegExp(`<!--${match}-->`, 'g'), content)
this.html = this.html.replace(new RegExp(`<!--${match}-->`, 'g'), content)

return this.html
}

_render (path, type) {
Expand All @@ -83,8 +85,8 @@ export default class Renderer {

switch (type) {
case 'sidebar':
html = this.compiler.sidebar(html, maxLevel)
+ `<script>window.__SUB_SIDEBAR__ = ${JSON.stringify(
html = this.compiler.sidebar(html, maxLevel) +
`<script>window.__SUB_SIDEBAR__ = ${JSON.stringify(
this.compiler.subSidebar(html, subMaxLevel)
)}</script>`
break
Expand Down
4 changes: 2 additions & 2 deletions src/core/render/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 1f4514d

Please sign in to comment.