File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ if (!sectionMatch) {
1515const pluginsListContent = sectionMatch [ 1 ] . trim ( ) ;
1616
1717// Regex to match individual plugin entries
18- const pluginRegex = / - # # # ( .+ ?) / g;
18+ const pluginRegex = / - # # # \[ ( .+ ?) \] / g;
1919const pluginNames = [ ] ;
2020let match ;
2121
@@ -50,11 +50,11 @@ parsedBadges.forEach(({ name, latestReleaseUrl }) => {
5050 console . log ( `Matching plugin found in README for ${ name } ` ) ;
5151
5252 // Construct the expected badge URL
53- const expectedBadgeUrl = `https://img.shields.io/github/downloads/${ name } /total` ;
53+ const expectedBadgeUrl = `https://img.shields.io/github/downloads/${ normalizedPluginName } /total` ;
5454
5555 // Regex to find and replace badge and download URL
5656 const badgeRegex = new RegExp (
57- `\!\ GitHub Downloads \ all releases\\\ https://img\\.shields\\.io/github/downloads/.+?/total\\\ .*?\ ` ,
57+ `\\[!\\[ GitHub Downloads \\( all releases\\)\\]\\( https://img\\.shields\\.io/github/downloads/.+?/total\\)\\]\\( .*?\\) ` ,
5858 'g'
5959 ) ;
6060 const newBadge = `[](${ latestReleaseUrl } )` ;
You can’t perform that action at this time.
0 commit comments