diff --git a/lib/modules/platform/github/massage-markdown-links.spec.ts b/lib/modules/platform/github/massage-markdown-links.spec.ts index 93564ab31a3945..0f24fff9e7096a 100644 --- a/lib/modules/platform/github/massage-markdown-links.spec.ts +++ b/lib/modules/platform/github/massage-markdown-links.spec.ts @@ -62,6 +62,7 @@ describe('modules/platform/github/massage-markdown-links', () => { ${'github.com/foo/bar/discussions/1'} | ${'[github.com/foo/bar/discussions/1](togithub.com/foo/bar/discussions/1)'} ${'github.com/foo/bar/issues/1'} | ${'[github.com/foo/bar/issues/1](togithub.com/foo/bar/issues/1)'} ${'github.com/foo/bar/pull/1'} | ${'[github.com/foo/bar/pull/1](togithub.com/foo/bar/pull/1)'} + ${'github.com/Foo/bar/pull/1'} | ${'[github.com/Foo/bar/pull/1](togithub.com/Foo/bar/pull/1)'} ${'www.github.com/foo/bar/discussions/1'} | ${'[www.github.com/foo/bar/discussions/1](www.togithub.com/foo/bar/discussions/1)'} ${'www.github.com/foo/bar/issues/1'} | ${'[www.github.com/foo/bar/issues/1](www.togithub.com/foo/bar/issues/1)'} ${'www.github.com/foo/bar/pull/1'} | ${'[www.github.com/foo/bar/pull/1](www.togithub.com/foo/bar/pull/1)'} diff --git a/lib/modules/platform/github/massage-markdown-links.ts b/lib/modules/platform/github/massage-markdown-links.ts index c55a1eba8e1528..e4323f0c274fc8 100644 --- a/lib/modules/platform/github/massage-markdown-links.ts +++ b/lib/modules/platform/github/massage-markdown-links.ts @@ -22,7 +22,6 @@ function collectLinkPosition(input: string, matches: UrlMatch[]): Plugin { const transformer = (tree: Content): void => { const startOffset: number = tree.position?.start.offset ?? 0; const endOffset: number = tree.position?.end.offset ?? 0; - if (tree.type === 'link') { const substr = input.slice(startOffset, endOffset); const url: string = tree.url; @@ -35,7 +34,7 @@ function collectLinkPosition(input: string, matches: UrlMatch[]): Plugin { }); } } else if (tree.type === 'text') { - const globalUrlReg = new RegExp(urlRegex, 'g'); + const globalUrlReg = new RegExp(urlRegex, 'gi'); const urlMatches = [...tree.value.matchAll(globalUrlReg)]; for (const match of urlMatches) { const [url] = match;