]> git.ipfire.org Git - thirdparty/Font-Awesome.git/commitdiff
issue-18807 - Update Icon Name RegEx issue-18807
authoralexpoiry <alex.poiry@gmail.com>
Thu, 24 Mar 2022 18:09:43 +0000 (13:09 -0500)
committeralexpoiry <alex.poiry@gmail.com>
Thu, 24 Mar 2022 18:09:43 +0000 (13:09 -0500)
Making a modification to the icon name regex in fontawesome.js for
the purpose of correctly paring names beginning with fa.

js/fontawesome.js

index 1602190759573ff831f8d23f62a115667fbf4b2a..b977b9dd8906013f7696515f8079e087a4653f5d 100644 (file)
     'fa-solid': 'fas',
     'fa-thin': 'fat'
   };
-  var ICON_SELECTION_SYNTAX_PATTERN = /fa[srltdbk\-\ ]/; // eslint-disable-line no-useless-escape
+  var ICON_SELECTION_SYNTAX_PATTERN = /fa[srltdbk]?[\-\ ]/; // eslint-disable-line no-useless-escape
 
   var LAYERS_TEXT_CLASSNAME = 'fa-layers-text';
   var FONT_FAMILY_PATTERN = /Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Kit)?.*/i; // TODO: do we need to handle font-weight for kit SVG pseudo-elements?