mirror of
https://gitee.com/docsifyjs/docsify.git
synced 2024-11-30 02:58:37 +08:00
fix: update match regex (#669)
This commit is contained in:
parent
b52607dec9
commit
2edf47ec73
@ -176,9 +176,10 @@ export function renderMixin(proto) {
|
|||||||
dom.toggleClass(el, 'add', 'show')
|
dom.toggleClass(el, 'add', 'show')
|
||||||
|
|
||||||
let html = this.coverIsHTML ? text : this.compiler.cover(text)
|
let html = this.coverIsHTML ? text : this.compiler.cover(text)
|
||||||
|
|
||||||
const m = html
|
const m = html
|
||||||
.trim()
|
.trim()
|
||||||
.match('<p><img.*?data-origin="(.*?)"[^a]+alt="(.*?)">([^<]*?)</p>$')
|
.match('<img.*?data-origin="(.*?)"[^a]+alt="(.*?)">([^<]*?)$')
|
||||||
|
|
||||||
if (m) {
|
if (m) {
|
||||||
if (m[2] === 'color') {
|
if (m[2] === 'color') {
|
||||||
|
Loading…
Reference in New Issue
Block a user