issue-18807 - Update Icon Name RegEx

Making a modification to the icon name regex in fontawesome.js for
the purpose of correctly paring names beginning with fa.
This commit is contained in:
alexpoiry 2022-03-24 13:09:43 -05:00
parent 28e297f07a
commit 3691815a77

View File

@ -323,7 +323,7 @@
'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?