diff --git a/label-icons-config.json b/label-icons-config.json
index 8714418ae..96a344240 100644
--- a/label-icons-config.json
+++ b/label-icons-config.json
@@ -1,9 +1,11 @@
{
"_": "Manually maintained set of icons to exclude and an alias map from labels to icon/language ids",
- "exclude": ["ai"],
+ "exclude": ["ai", "c", "c#", "c++"],
"aliases": {
"javascript": "js",
"ecmascript": "js",
- "ecmascript6": "js"
+ "ecmascript6": "js",
+ "cpp": "c++",
+ "mac": "apple"
}
}
diff --git a/label-icons.json b/label-icons.json
index 1a2a7730c..fbcf38078 100644
--- a/label-icons.json
+++ b/label-icons.json
@@ -4,27 +4,16 @@
"arduino": "cyan",
"asciidoc": "cyan",
"astro": "graphite",
- "audio": "red",
"azure": "sky",
"bazel": "green",
"binary": "graphite",
- "blade": "orange",
- "bower": "yellow",
- "c": "purple",
- "c#": "blue",
- "c++": "sky",
- "cairo": "graphite",
"clojure": "purple",
"cmake": "blue",
"coffeescript": "orange",
"composer": "orange",
- "cpp": "sky",
"crystal": "graphite",
"css": "blue",
"csv": "green",
- "cuda": "green",
- "dart": "cyan",
- "delphi": "red",
"diff": "yellow",
"dlang": "red",
"docker": "sky",
@@ -33,14 +22,11 @@
"ember": "green",
"erlang": "red",
"eslint": "purple",
- "excel": "green",
"font": "green",
"fortran": "red",
"git": "orange",
- "gleam": "pink",
"go": "sky",
"graphql": "pink",
- "graphviz": "cyan",
"groovy": "cyan",
"haml": "yellow",
"haskell": "purple",
@@ -52,21 +38,16 @@
"jq": "orange",
"js": "yellow",
"json": "green",
- "jsp": "purple",
"jsx": "blue",
"julia": "purple",
- "kdl": "purple",
"kotlin": "blue",
"less": "blue",
- "liquid": "green",
"lisp": "red",
"log": "graphite",
- "lsl": "cyan",
"lua": "blue",
"markdown": "graphite",
"markup": "purple",
"matlab": "orange",
- "maven": "red",
"mdx": "cyan",
"nginx": "green",
"nim": "yellow",
@@ -74,24 +55,15 @@
"note": "green",
"npm": "red",
"nsis": "purple",
- "ocaml": "yellow",
- "odin": "blue",
- "parquet": "sky",
- "pawn": "orange",
"pdf": "red",
"perl": "graphite",
"php": "blue",
- "postcss": "red",
"powershell": "blue",
"preferences": "yellow",
- "prisma": "graphite",
"protobuf": "graphite",
- "pug": "yellow",
"puppet": "purple",
"python": "yellow",
- "qt": "green",
"r": "blue",
- "racket": "red",
"rails": "red",
"react": "sky",
"restructuredtext": "sky",
@@ -103,7 +75,6 @@
"scss": "pink",
"settings": "graphite",
"shell": "green",
- "slim": "cyan",
"solidity": "graphite",
"source": "sky",
"sql": "blue",
@@ -120,24 +91,15 @@
"textile": "pink",
"todo": "green",
"toml": "cyan",
- "travis": "orange",
"twig": "green",
"typescript": "sky",
- "typst": "cyan",
"unreal": "graphite",
- "v": "cyan",
"vala": "sky",
"verilog": "blue",
"vhdl": "blue",
"vim": "green",
"vue": "cyan",
- "vyper": "graphite",
- "wast": "purple",
- "webpack": "blue",
- "wgsl": "sky",
"windows": "sky",
- "wit": "pink",
"yaml": "yellow",
- "yarn": "blue",
"zig": "yellow"
}
diff --git a/static/label-icons.svg b/static/label-icons.svg
index 17527e642..9ffe25eed 100644
--- a/static/label-icons.svg
+++ b/static/label-icons.svg
@@ -18,9 +18,6 @@
-
-
-
@@ -32,24 +29,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -62,9 +41,6 @@
-
-
-
@@ -74,21 +50,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -115,9 +76,6 @@
-
-
-
@@ -127,12 +85,6 @@
-
-
-
-
-
-
@@ -163,9 +115,6 @@
-
-
-
@@ -202,39 +151,24 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -248,15 +182,6 @@
-
-
-
-
-
-
-
-
-
@@ -279,19 +204,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -301,18 +213,12 @@
-
-
-
-
-
-
@@ -322,9 +228,6 @@
-
-
-
@@ -332,17 +235,9 @@
-
-
-
-
-
-
-
-
@@ -379,9 +274,6 @@
-
-
-
@@ -431,32 +323,16 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -472,36 +348,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/util/build-label-icons.mjs b/util/build-label-icons.mjs
index edde7b617..09bd5bd21 100644
--- a/util/build-label-icons.mjs
+++ b/util/build-label-icons.mjs
@@ -64,7 +64,7 @@ function main() {
ensureDir(path.dirname(spritePath))
/** @type {Set} */
- const usedLabels = new Set()
+ const usedLabels = {}
/** @type {Record} */
let aliases = {}
/** @type {Set} */
@@ -106,7 +106,8 @@ function main() {
const key = label.trim().toLowerCase()
if (!key) continue
const canonical = (aliases[key] && aliases[key].trim().toLowerCase()) || key
- usedLabels.add(canonical)
+ usedLabels[canonical] ??= 0
+ usedLabels[canonical] += 1
}
}
}
@@ -140,7 +141,7 @@ function main() {
const typeKey = type.trim().toLowerCase()
// If we have a set of used labels, restrict icons to those labels (or alias targets)
- if (usedLabels.size > 0 && !usedLabels.has(typeKey)) {
+ if (usedLabels.size > 0 && (!(typeKey in usedLabels) || usedLabels[typeKey] <= 1)) {
continue
}