mirror of
https://github.com/misenhower/splatoon2.ink.git
synced 2026-03-21 17:24:37 -05:00
Decode HTML entities in gear names retrieved from Inkipedia
This fixes matching issues for gear with ampersands like "Red & Black Squidkid IV".
This commit is contained in:
parent
f7fac094da
commit
35eb01b2da
|
|
@ -28,6 +28,7 @@
|
|||
"dotenv": "^4.0.0",
|
||||
"extract-text-webpack-plugin": "^3.0.0",
|
||||
"file-loader": "^0.11.2",
|
||||
"he": "^1.1.1",
|
||||
"html-loader": "^0.5.0",
|
||||
"html-webpack-plugin": "^2.30.1",
|
||||
"ical.js": "^1.2.2",
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
},
|
||||
{
|
||||
"brand": "8",
|
||||
"name": "Baby-Jelly Shirt & Tie",
|
||||
"name": "Baby-Jelly Shirt & Tie",
|
||||
"price": 3800,
|
||||
"rarity": 1,
|
||||
"skill": "13"
|
||||
|
|
@ -436,7 +436,7 @@
|
|||
},
|
||||
{
|
||||
"brand": "8",
|
||||
"name": "Shirt & Tie",
|
||||
"name": "Shirt & Tie",
|
||||
"price": 8400,
|
||||
"rarity": 2,
|
||||
"skill": "6"
|
||||
|
|
@ -1049,7 +1049,7 @@
|
|||
},
|
||||
{
|
||||
"brand": "16",
|
||||
"name": "Blue & Black Squidkid IV",
|
||||
"name": "Blue & Black Squidkid IV",
|
||||
"price": 11000,
|
||||
"rarity": 2,
|
||||
"skill": "9"
|
||||
|
|
@ -1259,7 +1259,7 @@
|
|||
},
|
||||
{
|
||||
"brand": "16",
|
||||
"name": "Red & Black Squidkid IV",
|
||||
"name": "Red & Black Squidkid IV",
|
||||
"price": 11000,
|
||||
"rarity": 2,
|
||||
"skill": "5"
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ const mkdirp = require('mkdirp');
|
|||
const axios = require('axios');
|
||||
const retrieveGearData = require('./retrieveGearData');
|
||||
const stringify = require('json-stable-stringify');
|
||||
const he = require('he');
|
||||
|
||||
const dataPath = path.resolve('src/js/data');
|
||||
const brandsFilename = `${dataPath}/brands.json`;
|
||||
|
|
@ -72,7 +73,7 @@ function applyData(oldData, newData) {
|
|||
let details = /name=(.*?)\|brand=(.*?)\|cost=(.*?)\|ability=(.*?)\|rarity=(.*?)\|/.exec(row[0]);
|
||||
if (details) {
|
||||
inkipediaGear[key].push({
|
||||
name: details[1],
|
||||
name: he.decode(details[1]),
|
||||
brand: details[2],
|
||||
price: parseInt(details[3].replace(',', '')),
|
||||
skill: details[4],
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user