forked from MapComplete/MapComplete
		
	Fix OSM-icon (and exempt it from strict validation rules)
This commit is contained in:
		
							parent
							
								
									66990b1028
								
							
						
					
					
						commit
						7b4d4e38e6
					
				
					 2 changed files with 1362 additions and 2567 deletions
				
			
		|  | @ -116,14 +116,12 @@ class LayerOverviewUtils { | |||
|             .filter(path => path.endsWith(".svg")) | ||||
|             .filter(path => !path.startsWith("./assets/generated")) | ||||
|         let errCount = 0; | ||||
|         const exempt = ["assets/SocialImageTemplate.svg","assets/SocialImageTemplateWide.svg","assets/SocialImageBanner.svg", "assets/svg/osm-logo.svg"]; | ||||
|         for (const path of allSvgs) { | ||||
|             if(path.indexOf("assets/SocialImageTemplate") >= 0){ | ||||
|             if(exempt.some(p => "./"+p === path)) { | ||||
|                 continue | ||||
|             } | ||||
| 
 | ||||
|             if(path.indexOf("assets/SocialImage") >= 0){ | ||||
|                 continue | ||||
|             } | ||||
|             const contents = readFileSync(path, "UTF8") | ||||
|             if (contents.indexOf("data:image/png;") >= 0) { | ||||
|                 console.warn("The SVG at " + path + " is a fake SVG: it contains PNG data!") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue