Fix OSM-icon (and exempt it from strict validation rules)

This commit is contained in:
pietervdvn 2022-06-04 18:23:06 +02:00
parent 66990b1028
commit 7b4d4e38e6
2 changed files with 1362 additions and 2567 deletions

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 168 KiB

View file

@ -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!")