should follow the format \"[ICON_NAME] icon\"");
+ } else {
+ const titleMatch = iconTitleText.match(titleRegexp);
+ // titleMatch = [ "[ICON_NAME] icon", "[ICON_NAME]" ]
+ const rawIconName = titleMatch[1];
+ const iconName = htmlFriendlyToTitle(rawIconName);
+ const icon = data.icons.find(icon => icon.title === iconName);
+ if (icon === undefined) {
+ reporter.error(`No icon with title "${iconName}" found in simple-icons.json`);
+ }
+ }
+ },
]
}
};
diff --git a/icons/adobecreativecloud.svg b/icons/adobecreativecloud.svg
index 5c5e55ec..a980f301 100644
--- a/icons/adobecreativecloud.svg
+++ b/icons/adobecreativecloud.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/adobexd.svg b/icons/adobexd.svg
index 57b9d932..13e70257 100644
--- a/icons/adobexd.svg
+++ b/icons/adobexd.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/allocine.svg b/icons/allocine.svg
index 76ba9d42..30ad1a78 100644
--- a/icons/allocine.svg
+++ b/icons/allocine.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/applepay.svg b/icons/applepay.svg
index b473ad3d..a9586044 100644
--- a/icons/applepay.svg
+++ b/icons/applepay.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/cirrusci.svg b/icons/cirrusci.svg
index e7d920fc..a17e8a13 100644
--- a/icons/cirrusci.svg
+++ b/icons/cirrusci.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/codesandbox.svg b/icons/codesandbox.svg
index a4e677a9..e99071d7 100644
--- a/icons/codesandbox.svg
+++ b/icons/codesandbox.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/elasticsearch.svg b/icons/elasticsearch.svg
index ea26d1cb..ebab5bec 100644
--- a/icons/elasticsearch.svg
+++ b/icons/elasticsearch.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/googleallo.svg b/icons/googleallo.svg
index 99a2597f..6809a7d5 100644
--- a/icons/googleallo.svg
+++ b/icons/googleallo.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/groupon.svg b/icons/groupon.svg
index 8cfe63f0..10621966 100644
--- a/icons/groupon.svg
+++ b/icons/groupon.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/hockeyapp.svg b/icons/hockeyapp.svg
index 95ae93d7..c7dd0072 100644
--- a/icons/hockeyapp.svg
+++ b/icons/hockeyapp.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/iconjar.svg b/icons/iconjar.svg
index ec722311..bf7c9900 100644
--- a/icons/iconjar.svg
+++ b/icons/iconjar.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/ionic.svg b/icons/ionic.svg
index 3727b745..b5855ec4 100644
--- a/icons/ionic.svg
+++ b/icons/ionic.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/itch-dot-io.svg b/icons/itch-dot-io.svg
index edea81e8..0892fccb 100644
--- a/icons/itch-dot-io.svg
+++ b/icons/itch-dot-io.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/microsoftonedrive.svg b/icons/microsoftonedrive.svg
index f00e682d..161a9e39 100644
--- a/icons/microsoftonedrive.svg
+++ b/icons/microsoftonedrive.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/mix.svg b/icons/mix.svg
index 7f275c6a..74c39b01 100644
--- a/icons/mix.svg
+++ b/icons/mix.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/node-dot-js.svg b/icons/node-dot-js.svg
index 8f50da48..e4f97700 100644
--- a/icons/node-dot-js.svg
+++ b/icons/node-dot-js.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/nuget.svg b/icons/nuget.svg
index b6fed9c1..b9872791 100644
--- a/icons/nuget.svg
+++ b/icons/nuget.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/playstation3.svg b/icons/playstation3.svg
index 4928d3e0..1b47124d 100644
--- a/icons/playstation3.svg
+++ b/icons/playstation3.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/playstation4.svg b/icons/playstation4.svg
index a1d9bd82..0656dafe 100644
--- a/icons/playstation4.svg
+++ b/icons/playstation4.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/safari.svg b/icons/safari.svg
index 429fe25d..a1ea2317 100644
--- a/icons/safari.svg
+++ b/icons/safari.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/scaleway.svg b/icons/scaleway.svg
index aeebfe12..aa0005db 100644
--- a/icons/scaleway.svg
+++ b/icons/scaleway.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/scrutinizerci.svg b/icons/scrutinizerci.svg
index 0f51ceb2..367cfb50 100644
--- a/icons/scrutinizerci.svg
+++ b/icons/scrutinizerci.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/stylus.svg b/icons/stylus.svg
index 765cbcd3..30c8b54f 100644
--- a/icons/stylus.svg
+++ b/icons/stylus.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/icons/wolframmathematica.svg b/icons/wolframmathematica.svg
index 29448a78..2be76cf4 100644
--- a/icons/wolframmathematica.svg
+++ b/icons/wolframmathematica.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/scripts/utils.js b/scripts/utils.js
index ae7b38f8..6b2d0a15 100644
--- a/scripts/utils.js
+++ b/scripts/utils.js
@@ -21,5 +21,16 @@ module.exports = {
.replace(/ò|ó|ô|õ|ö/, "o")
.replace(/ù|ú|û|ü/, "u")
.replace(/ý|ÿ/, "y")
+ ),
+
+ /**
+ * Converts a brand title in HTML friendly format into a brand title (as it
+ * is seen in simple-icons.json)
+ * @param {String} htmlFriendlyTitle The title to convert
+ */
+ htmlFriendlyToTitle: htmlFriendlyTitle => (
+ htmlFriendlyTitle
+ .replace(/&/g, "&")
+ .replace(/'/g, "’")
)
}