Skip to content

Commit

Permalink
another refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist authored Oct 10, 2019
1 parent 58ccd38 commit 4eb445c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/saber/vue-renderer/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,7 @@ class VueRenderer {
return this.renderer
}

async renderPageContent(url, options) {
options = {
scoped: false,
...options
}

async renderPageContent(url, { scoped = false } = {}) {
const random = 'asdhkBJKAbjkf@3^1_a=--+'
const startingMark = `__mark_page_content_start__${random}`
const endingMark = `__mark_page_content_stop__${random}`
Expand All @@ -305,7 +300,7 @@ class VueRenderer {
html.indexOf(endingMark)
)

return options.scoped
return scoped
? content
: content.replace(/((?: data-v-[a-z0-9]{8})+)>/gm, '>')
}
Expand Down

0 comments on commit 4eb445c

Please sign in to comment.