1
0
mirror of https://github.com/simple-icons/simple-icons.git synced 2024-12-16 01:10:30 +02:00

Merge pull request #910 from simple-icons/develop

Publish fix to page search
This commit is contained in:
Johan Fagerberg 2018-07-27 17:36:29 +02:00 committed by GitHub
commit b8d084115d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,7 +177,12 @@
</script> </script>
<script> <script>
function normalizeSearchTerm(value) { function normalizeSearchTerm(value) {
return value.toLowerCase().replace(/ /g, ''); return value.toLowerCase()
.replace(/\+/g, "plus")
.replace(/^\./, "dot-")
.replace(/\.$/, "-dot")
.replace(/\./g, "-dot-")
.replace(/[ !’]/g, '');
} }
var icons = [{{ allIconNames }}].map(normalizeSearchTerm); var icons = [{{ allIconNames }}].map(normalizeSearchTerm);
</script> </script>