Skip to content

Commit 2edf47e

Browse files
cheng-kangQingWei-Li
authored andcommitted
fix: update match regex (#669)
1 parent b52607d commit 2edf47e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/render/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,10 @@ export function renderMixin(proto) {
176176
dom.toggleClass(el, 'add', 'show')
177177

178178
let html = this.coverIsHTML ? text : this.compiler.cover(text)
179+
179180
const m = html
180181
.trim()
181-
.match('<p><img.*?data-origin="(.*?)"[^a]+alt="(.*?)">([^<]*?)</p>$')
182+
.match('<img.*?data-origin="(.*?)"[^a]+alt="(.*?)">([^<]*?)$')
182183

183184
if (m) {
184185
if (m[2] === 'color') {

0 commit comments

Comments
 (0)