@@ -880,19 +880,24 @@ export class ExternalServicesManager {
880880 let iconName = null ;
881881
882882 for ( const part of parts ) {
883- // Font Awesome shorthand style prefixes: r=regular, s=solid, b=brands, d=duotone, l=light, t=thin (far/fas/fab/fad/fal/fat)
883+ // Font Awesome style prefixes: shorthand (far/fas/fab/fad/fal/fat) and longhand (fa-regular/fa-solid/fa-brands/fa-duotone/fa-light/fa-thin )
884884 if ( / ^ f a [ r s b d l t ] $ / . test ( part ) || / ^ f a - ( s o l i d | r e g u l a r | b r a n d s | l i g h t | d u o t o n e | t h i n ) $ / . test ( part ) ) {
885885 stylePrefix = part ;
886886 continue ;
887887 }
888888
889- if ( ! iconName && / ^ f a - [ a - z 0 - 9 - ] + $ / . test ( part ) && ! FA_ICON_MODIFIER_PATTERN . test ( part ) ) {
889+ if ( ! iconName && / ^ f a - [ a - z 0 - 9 ] + (?: - [ a - z 0 - 9 ] + ) * $ / . test ( part ) && ! FA_ICON_MODIFIER_PATTERN . test ( part ) ) {
890890 iconName = part ;
891891 }
892892 }
893893
894894 if ( ! iconName ) {
895- iconName = sanitizeFaIconSuffix ( value ) ;
895+ const iconCandidates = parts . filter ( ( part ) =>
896+ ! / ^ f a [ r s b d l t ] $ / . test ( part ) &&
897+ ! / ^ f a - ( s o l i d | r e g u l a r | b r a n d s | l i g h t | d u o t o n e | t h i n ) $ / . test ( part ) &&
898+ ! FA_ICON_MODIFIER_PATTERN . test ( part )
899+ ) ;
900+ iconName = sanitizeFaIconSuffix ( iconCandidates . length ? iconCandidates [ iconCandidates . length - 1 ] : "" ) ;
896901 }
897902
898903 return { stylePrefix, iconName } ;
@@ -1403,9 +1408,9 @@ export class ExternalServicesManager {
14031408
14041409 serviceKeys . forEach ( ( key ) => {
14051410 const definition = SERVICE_DEFINITIONS [ key ] || { } ;
1406- const category = typeof definition . category === 'string' && definition . category . trim ( )
1407- ? definition . category . trim ( )
1408- : 'Uncategorized' ;
1411+ const rawCategory = definition . category ;
1412+ const trimmedCategory = typeof rawCategory === 'string' ? rawCategory . trim ( ) : '' ;
1413+ const category = trimmedCategory || 'Uncategorized' ;
14091414
14101415 if ( ! servicesByCategory . has ( category ) ) {
14111416 servicesByCategory . set ( category , [ ] ) ;
0 commit comments