From 670771c8ad9cbb6f17e5aa30e39782ec91363d1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=AA=E5=BF=83=E7=A6=BE?= Date: Sun, 31 May 2020 22:26:54 +0800 Subject: [PATCH 1/2] Improve Font Awesome Detection --- src/apps.json | 8 ++++---- src/icons/Font Awesome.png | Bin 590 -> 0 bytes src/icons/font-awesome.svg | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 src/icons/Font Awesome.png create mode 100644 src/icons/font-awesome.svg diff --git a/src/apps.json b/src/apps.json index 666f8b3f1..a330f3bc7 100644 --- a/src/apps.json +++ b/src/apps.json @@ -3785,11 +3785,11 @@ ], "html": [ "]* href=[^>]+(?:([\\d.]+)/)?(?:css/)?font-awesome(?:\\.min)?\\.css\\;version:\\1", - "]* href=\"https://use\\.fontawesome\\.com/releases/v([^>]+)/css/\\;version:\\1", - "]* src=[^>]+fontawesome(?:\\.js)?" + "]* href=(?:\".*?|[^>]*?)(?:F|f)o(?:n|r)t-?(?:A|a)wesome(?:.*?([0-9a-fA-F]{7,40}|[\\d]+(?:.[\\d]+(?:.[\\d]+)?)?)|).*?>\\;version:\\1" ], - "icon": "Font Awesome.png", - "website": "http://fontawesome.io" + "script": "(?:F|f)o(?:n|r)t-?(?:A|a)wesome(?:.*?([0-9a-fA-F]{7,40}|[\\d]+(?:.[\\d]+(?:.[\\d]+)?)?)|)\\;version:\\1", + "icon": "font-awesome.svg", + "website": "https://fontawesome.com/" }, "Fork CMS": { "cats": [ diff --git a/src/icons/Font Awesome.png b/src/icons/Font Awesome.png deleted file mode 100644 index 4a9568af1984aa51a04e8ff7cf2c46acc42701db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 590 zcmV-U05K(C!8XW@hHo1LXjy-3-?T$^lTjQ5^tGCl-h2qcD41s-`nwqR2L2GMkPzcONN-%GL z{AmIL0uDAdHf%6QMn^|82?+_A0Ok6D4tqx+>pcY8u@`R|;N|5l2MGexKmd^X3$*wt z7Z+C%u)GjtAOIvKCB=ZD*bLP349Vf2K$ZeSGg(<#nFq)>#p?i|!fvQ}2|ypcmynQ< zW*`v&3mA5wK6!C*aRq5MO%Uq&QpW1<}Z4AvbC)Ca^n02rLxMjbHffKdkwI|l&G zv?9v^Jv}`PQa}J~&t(FO*403K5m>fg1k#&;>Pmr93WO|ob#-L|s+~rP1GcNGsxtBO z^IHMyhBb_gj6ZNyG(fqZKs8GR1qF4`ie3hw8SFqa+<=bVjn>8>SQmT-YB~fo{4cRp zEKuz)pq`yT$8-R38<4#cSOGmIx%6WDg-1t)h!MMYj<5nBxuJPyRyXpD~oTiMkh cJ3)2>0FeK~sSqmESpWb407*qoM6N<$f|7{k6aWAK diff --git a/src/icons/font-awesome.svg b/src/icons/font-awesome.svg new file mode 100644 index 000000000..8c1d44528 --- /dev/null +++ b/src/icons/font-awesome.svg @@ -0,0 +1 @@ + \ No newline at end of file From 75f53f80fac372fb905b5bcfcba915710d14a8e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=AA=E5=BF=83=E7=A6=BE?= Date: Sun, 31 May 2020 22:43:38 +0800 Subject: [PATCH 2/2] Use `[^<]*` instead of `.*` --- src/apps.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps.json b/src/apps.json index a330f3bc7..9421e3e96 100644 --- a/src/apps.json +++ b/src/apps.json @@ -3785,7 +3785,7 @@ ], "html": [ "]* href=[^>]+(?:([\\d.]+)/)?(?:css/)?font-awesome(?:\\.min)?\\.css\\;version:\\1", - "]* href=(?:\".*?|[^>]*?)(?:F|f)o(?:n|r)t-?(?:A|a)wesome(?:.*?([0-9a-fA-F]{7,40}|[\\d]+(?:.[\\d]+(?:.[\\d]+)?)?)|).*?>\\;version:\\1" + "]* href=[^>]*?(?:F|f)o(?:n|r)t-?(?:A|a)wesome(?:[^>]*?([0-9a-fA-F]{7,40}|[\\d]+(?:.[\\d]+(?:.[\\d]+)?)?)|)\\;version:\\1" ], "script": "(?:F|f)o(?:n|r)t-?(?:A|a)wesome(?:.*?([0-9a-fA-F]{7,40}|[\\d]+(?:.[\\d]+(?:.[\\d]+)?)?)|)\\;version:\\1", "icon": "font-awesome.svg",