Skip to content

Commit b496e7c

Browse files
committed
fix: support embedded URLs for local images
close #60
1 parent 146bb4f commit b496e7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plugins/local-image.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function plugin(resolveUrl: (url: string) => string) {
1414
(renderAttrs, token) => {
1515
if (token.tag === 'img') {
1616
const src = token.attrGet('src');
17-
if (src && !src.includes('://')) {
17+
if (src && !/^[\w-]+:/.test(src)) {
1818
token.attrSet('src', resolveUrl(src));
1919
}
2020
}

0 commit comments

Comments
 (0)