diff --git a/src/tools/markdown/markdown.ts b/src/tools/markdown/markdown.ts index 4de7d7ab..ac0ebe69 100644 --- a/src/tools/markdown/markdown.ts +++ b/src/tools/markdown/markdown.ts @@ -50,8 +50,9 @@ export class markdown { // Handle relative links if (repo) { - input = input.replace(/!\[*.*\]\(\w*\.\w*\)/g, function (x) { + input = input.replace(/!\[*.*\]\((?!.*:\/\/).*\/*.*\.\w*\)/g, function (x) { return x + .replace("(/", "(") .replace("(", `(https://raw.githubusercontent.com/${repo?.full_name}/master/`) .replace("/blob/", "/"); });