mirror of
https://github.com/simple-icons/simple-icons.git
synced 2025-01-25 01:32:58 +02:00
Disallow underscores in slugs & filenames (#4921)
This commit is contained in:
parent
2727697c16
commit
54f9ceff75
@ -5916,6 +5916,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Pop!_OS",
|
"title": "Pop!_OS",
|
||||||
|
"slug": "pop_os",
|
||||||
"hex": "48B9C7",
|
"hex": "48B9C7",
|
||||||
"source": "https://pop.system76.com/"
|
"source": "https://pop.system76.com/"
|
||||||
},
|
},
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
{% assign filename = filename | replace: "+", "plus" %}
|
{% assign filename = filename | replace: "+", "plus" %}
|
||||||
{% assign filename = filename | replace: ".", "-dot-" %}
|
{% assign filename = filename | replace: ".", "-dot-" %}
|
||||||
{% assign filename = filename | replace: "&", "-and-" %}
|
{% assign filename = filename | replace: "&", "-and-" %}
|
||||||
{% assign filename = filename | replace: " ", "" | replace: "!", "" | replace: ":", "" | replace: "’", "" | replace: "'", "" | replace: "°", "" %}
|
{% assign filename = filename | replace: " ", "" | replace: "_", "" | replace: "!", "" | replace: ":", "" | replace: "’", "" | replace: "'", "" | replace: "°", "" %}
|
||||||
{% if icon.slug %}
|
{% if icon.slug %}
|
||||||
{% assign filename = icon.slug %}
|
{% assign filename = icon.slug %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -27,7 +27,7 @@ module.exports = {
|
|||||||
.replace(/ŧ/g, "t")
|
.replace(/ŧ/g, "t")
|
||||||
.normalize("NFD")
|
.normalize("NFD")
|
||||||
.replace(/[\u0300-\u036f]/g, "")
|
.replace(/[\u0300-\u036f]/g, "")
|
||||||
.replace(/[^a-z0-9_\-]/g, "")
|
.replace(/[^a-z0-9\-]/g, "")
|
||||||
),
|
),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user