aboutsummaryrefslogtreecommitdiff
path: root/update/parse.js
diff options
context:
space:
mode:
Diffstat (limited to 'update/parse.js')
-rw-r--r--update/parse.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/update/parse.js b/update/parse.js
index ebcd9e3..5be5ae5 100644
--- a/update/parse.js
+++ b/update/parse.js
@@ -49,7 +49,7 @@ let ponies = {};
} else {
data.extract_fr = data.extract;
}
- if (typeof box.coat !== "undefined") data.color = box.coat.replace(/<!--[\s\S]*?-->/g, "").trim().replace(/\[(.*)\/(.{6})\/ (.*)\]/gm, "$2").replace(/{{perbang\|([0-9A-Fa-f].{5})(.*)/g, "$1");
+ if (typeof box.coat !== "undefined") data.color = box.coat.replace(/<!--[\s\S]*?-->/g, "").trim().replace(/\[([a-z.\/ \nA-Z0-9:]*)\/(.{6})\/ (.*)\]/gm, "$2").replace(/{{perbang\|([0-9A-Fa-f].{5})(.*)/g, "$1");
if (typeof box.main !== "undefined") data.image = "https://mlp.fandom.com/Special:FilePath/" + encodeURI(box.main.replace(/<!--[\s\S]*?-->/g, "").trim());
if (typeof box.main1 !== "undefined") data.image = "https://mlp.fandom.com/Special:FilePath/" + encodeURI(box.main1.replace(/<!--[\s\S]*?-->/g, "").trim());
if (typeof box.image !== "undefined") data.image = "https://mlp.fandom.com/Special:FilePath/" + encodeURI(box.image.replace(/<!--[\s\S]*?-->/g, "").trim());