diff --git a/assets/svg/elevator.svg b/assets/svg/elevator.svg index ad43fe894..8f6343703 100644 --- a/assets/svg/elevator.svg +++ b/assets/svg/elevator.svg @@ -1,78 +1,44 @@ - - - - - - - - - - - - - - - - - - - + version="1.1" + id="elevator" + x="0px" + y="0px" + viewBox="0 0 65.9 66" + style="enable-background:new 0 0 65.9 66;" + xml:space="preserve" + xmlns="http://www.w3.org/2000/svg"> + + + + + + + + diff --git a/scripts/generateIncludedImages.ts b/scripts/generateIncludedImages.ts index d0902ae15..67eab59e3 100644 --- a/scripts/generateIncludedImages.ts +++ b/scripts/generateIncludedImages.ts @@ -17,13 +17,18 @@ function genImages(dryrun = false) { throw "Non-svg file detected in the svg files: " + path; } - let svg = fs.readFileSync("./assets/svg/" + path, "utf-8") + let svg : string = fs.readFileSync("./assets/svg/" + path, "utf-8") .replace(/<\?xml.*?>/, "") .replace(/fill: ?none;/g, "fill: none !important;") // This is such a brittle hack... .replace(/\n/g, " ") .replace(/\r/g, "") .replace(/\\/g, "\\") .replace(/"/g, "\\\"") + + let hasNonAsciiChars = Array.from(svg).some(char => char.charCodeAt(0) > 127); + if(hasNonAsciiChars){ + throw "The svg '"+path+"' has non-ascii characters"; + } const name = path.substr(0, path.length - 4) .replace(/[ -]/g, "_");