]> git.ipfire.org Git - thirdparty/google/fonts.git/commitdiff
Update tags.html
authorMarc Foley <m.foley.88@gmail.com>
Thu, 29 Aug 2024 15:07:33 +0000 (16:07 +0100)
committerGitHub <noreply@github.com>
Thu, 29 Aug 2024 15:07:33 +0000 (16:07 +0100)
tags.html

index 4ffa2e92e31a3f8cfad163ee71312dd503c4b695..20965b6d69e3cff86486896b3f15b6ae03f469b0 100644 (file)
--- a/tags.html
+++ b/tags.html
       },
       saveCSV() {
         this.Families = this.Families.filter((t) => t.Family !== "");
+        this.Families = Array.from(this.Families).sort((a, b) => {
+          if (`${a.Family},${a['Group/Tag']}` < `${b.Family},${b['Group/Tag']}`) {
+            return -1;
+          }
+          if (`${a.Family},${a['Group/Tag']}` > `${b.Family},${b['Group/Tag']}`) {
+            return 1;
+          }
+          return 0;
+        });
         let csv = Papa.unparse(this.Families,
           {
             columns: ["Family", "Group/Tag", "Weight"],
       },
       prCSV() {
         this.Families = this.Families.filter((t) => t.Family !== "");
+        this.Families = Array.from(this.Families).sort((a, b) => {
+          if (`${a.Family},${a['Group/Tag']}` < `${b.Family},${b['Group/Tag']}`) {
+            return -1;
+          }
+          if (`${a.Family},${a['Group/Tag']}` > `${b.Family},${b['Group/Tag']}`) {
+            return 1;
+          }
+          return 0;
+        });
         let csv = Papa.unparse(this.Families,
           {
             columns: ["Family", "Group/Tag", "Weight"],