mirror of
https://github.com/Mibew/simple-icons.git
synced 2025-01-18 08:01:08 +03:00
Merge pull request #906 from simple-icons/fix/904
Update index.js filename mapping to match site
This commit is contained in:
commit
946e5aacdf
5
index.js
5
index.js
@ -7,7 +7,10 @@ const icons = {};
|
|||||||
data.icons.forEach(i => {
|
data.icons.forEach(i => {
|
||||||
const filename = i.title.toLowerCase()
|
const filename = i.title.toLowerCase()
|
||||||
.replace(/\+/g, "plus")
|
.replace(/\+/g, "plus")
|
||||||
.replace(/[ .\-!’]/g, '');
|
.replace(/^\./, "dot-")
|
||||||
|
.replace(/\.$/, "-dot")
|
||||||
|
.replace(/\./g, "-dot-")
|
||||||
|
.replace(/[ !’]/g, '');
|
||||||
i.svg = fs.readFileSync(`${__dirname}/icons/${filename}.svg`, 'utf8');
|
i.svg = fs.readFileSync(`${__dirname}/icons/${filename}.svg`, 'utf8');
|
||||||
icons[i.title] = i
|
icons[i.title] = i
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user