Skip to content

Commit f37621d

Browse files
authored
fixes #322 (#924)
1 parent 3fc1a9a commit f37621d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/package.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ export abstract class MarkdownProcessor extends BaseProcessor {
779779

780780
// Replace <img> links with urls
781781
contents = contents.replace(/<(?:img|video)[^>]+src=["']([/.\w\s#-]+)['"][^>]*>/gm, (all, link) => {
782-
const isLinkRelative = !/^\w+:\/\//.test(link) && link[0] !== '#';
782+
const isLinkRelative = !/^\w+:\/\//.test(link) && link[0] !== '#' && !link.startsWith('data:');
783783

784784
if (!this.baseImagesUrl && isLinkRelative) {
785785
throw new Error(

0 commit comments

Comments
 (0)