mirror of
				https://github.com/Mibew/simple-icons.git
				synced 2025-10-31 10:31:06 +03:00 
			
		
		
		
	Update index.js filename mapping to match site
Updates index.js filename mapping to match the Jekyll implementation. This was missed in #888 (we should implement tests to avoid this in the future). The JS implementation is a direct translation of the Jekyll one. Closes #904
This commit is contained in:
		
							parent
							
								
									924632bc6f
								
							
						
					
					
						commit
						6e60021f55
					
				
							
								
								
									
										5
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								index.js
									
									
									
									
									
								
							| @ -7,7 +7,10 @@ const icons = {}; | ||||
| data.icons.forEach(i => { | ||||
|   const filename = i.title.toLowerCase() | ||||
|     .replace(/\+/g, "plus") | ||||
|     .replace(/[ .\-!’]/g, ''); | ||||
|     .replace(/^\./, "dot-") | ||||
|     .replace(/\.$/, "-dot") | ||||
|     .replace(/\./g, "-dot-") | ||||
|     .replace(/[ !’]/g, ''); | ||||
|   i.svg = fs.readFileSync(`${__dirname}/icons/${filename}.svg`, 'utf8'); | ||||
|   icons[i.title] = i | ||||
| }); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user