mirror of
				https://github.com/Mibew/simple-icons.git
				synced 2025-10-31 10:31:06 +03:00 
			
		
		
		
	Fix number of icons not updated on README when decreased (#11537)
This commit is contained in:
		
							parent
							
								
									e7ebb48de8
								
							
						
					
					
						commit
						1fd47d646b
					
				| @ -32,12 +32,12 @@ try { | ||||
|     const overNIconsInReadme = Number.parseInt(match[1], 10); | ||||
|     const iconsData = await getIconsData(); | ||||
|     const nIcons = iconsData.length; | ||||
|     const newNIcons = overNIconsInReadme + updateRange; | ||||
|     const nIconsRounded = Math.floor(nIcons / updateRange) * updateRange; | ||||
| 
 | ||||
|     if (nIcons > newNIcons) { | ||||
|     if (overNIconsInReadme !== nIconsRounded) { | ||||
|       const newContent = readmeContent.replace( | ||||
|         regexMatcher, | ||||
|         `Over ${newNIcons} `, | ||||
|         `Over ${nIconsRounded} `, | ||||
|       ); | ||||
|       await fs.writeFile(readmeFile, newContent); | ||||
|     } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user