From 1a945d445a636d778b242f9d74af4f72c7d89e16 Mon Sep 17 00:00:00 2001 From: "cinwell.li" Date: Fri, 2 Nov 2018 02:14:02 +0800 Subject: [PATCH] fix(cover): Compatible with legacy styles, fixed #677 (#678) Please makes sure these boxes are checked before submitting your PR, thank you! * [ ] Make sure you are merging your commits to `master` branch. * [ ] Add some descriptions and refer relative issues for you PR. * [ ] DO NOT include files inside `lib` directory. --- src/core/render/compiler.js | 2 -- src/core/render/index.js | 13 +------------ src/themes/basic/_coverpage.styl | 2 +- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/core/render/compiler.js b/src/core/render/compiler.js index 41ae3a132..34c64ae72 100644 --- a/src/core/render/compiler.js +++ b/src/core/render/compiler.js @@ -265,8 +265,6 @@ export class Compiler { result = helperTpl('tip', text) } else if (/^\?>/.test(text)) { result = helperTpl('warn', text) - } else if (/^${text}

` } diff --git a/src/core/render/index.js b/src/core/render/index.js index feacd60d2..fae1bc526 100644 --- a/src/core/render/index.js +++ b/src/core/render/index.js @@ -179,7 +179,7 @@ export function renderMixin(proto) { const m = html .trim() - .match('([^<]*?)$') + .match('

([^<]*?)

$') if (m) { if (m[2] === 'color') { @@ -198,17 +198,6 @@ export function renderMixin(proto) { html = html.replace(m[0], '') } - // XXX: A Workaround - html = html - .split('\n') - .map(part => { - if (/^ a[data-button] + .cover-main > p:last-child a border-color var(--theme-color, $color-primary) border-radius 2rem border-style solid