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
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 168 KiB |
|
@ -116,14 +116,12 @@ class LayerOverviewUtils {
|
||||||
.filter(path => path.endsWith(".svg"))
|
.filter(path => path.endsWith(".svg"))
|
||||||
.filter(path => !path.startsWith("./assets/generated"))
|
.filter(path => !path.startsWith("./assets/generated"))
|
||||||
let errCount = 0;
|
let errCount = 0;
|
||||||
|
const exempt = ["assets/SocialImageTemplate.svg","assets/SocialImageTemplateWide.svg","assets/SocialImageBanner.svg", "assets/svg/osm-logo.svg"];
|
||||||
for (const path of allSvgs) {
|
for (const path of allSvgs) {
|
||||||
if(path.indexOf("assets/SocialImageTemplate") >= 0){
|
if(exempt.some(p => "./"+p === path)) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if(path.indexOf("assets/SocialImage") >= 0){
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
const contents = readFileSync(path, "UTF8")
|
const contents = readFileSync(path, "UTF8")
|
||||||
if (contents.indexOf("data:image/png;") >= 0) {
|
if (contents.indexOf("data:image/png;") >= 0) {
|
||||||
console.warn("The SVG at " + path + " is a fake SVG: it contains PNG data!")
|
console.warn("The SVG at " + path + " is a fake SVG: it contains PNG data!")
|
||||||
|
|
Loading…
Reference in a new issue