fix: update match regex (#669)

This commit is contained in:
程康
2018-11-01 07:09:34 +08:00
committed by cinwell.li
parent b52607dec9
commit 2edf47ec73
+2 -1
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') {