mirror of https://gitlab.com/curben/blog
fix(open_graph): exclude svg files
This commit is contained in:
parent
5f06b4d260
commit
f58819bb3a
|
@ -72,7 +72,7 @@ function openGraphHelper (options = {}) {
|
|||
let img
|
||||
const imgPattern = /<img [^>]*src=['"]([^'"]+)([^>]*>)/gi
|
||||
while ((img = imgPattern.exec(content)) !== null) {
|
||||
images.push(img[1])
|
||||
if (!img[1].endsWith('.svg')) images.push(img[1])
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue