fix: update match regex (#669)

This commit is contained in:
程康 2018-10-31 23:09:34 +00:00 committed by cinwell.li
parent b52607dec9
commit 2edf47ec73

View File

@ -176,9 +176,10 @@ export function renderMixin(proto) {
dom.toggleClass(el, 'add', 'show')
let html = this.coverIsHTML ? text : this.compiler.cover(text)
const m = html
.trim()
.match('<p><img.*?data-origin="(.*?)"[^a]+alt="(.*?)">([^<]*?)</p>$')
.match('<img.*?data-origin="(.*?)"[^a]+alt="(.*?)">([^<]*?)$')
if (m) {
if (m[2] === 'color') {