Skip to content

Commit

Permalink
fix: update match regex (#669)
Browse files Browse the repository at this point in the history
  • Loading branch information
cheng-kang authored and QingWei-Li committed Oct 31, 2018
1 parent b52607d commit 2edf47e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/render/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit 2edf47e

Please sign in to comment.