Skip to content

Commit

Permalink
fix(changelog): massage links case insensitive (#15570)
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed May 13, 2022
1 parent 098d22d commit 9a1d98c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/modules/platform/github/massage-markdown-links.spec.ts
Expand Up @@ -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)'}
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/platform/github/massage-markdown-links.ts
Expand Up @@ -35,7 +35,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;
Expand Down

0 comments on commit 9a1d98c

Please sign in to comment.