Skip to content

Commit

Permalink
fixes #322 (#924)
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno authored Dec 18, 2023
1 parent 3fc1a9a commit f37621d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ export abstract class MarkdownProcessor extends BaseProcessor {

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

if (!this.baseImagesUrl && isLinkRelative) {
throw new Error(
Expand Down

0 comments on commit f37621d

Please sign in to comment.