From 9f6ac11ecb6c4155f2ae66ea21c1f5cf1fb51dab Mon Sep 17 00:00:00 2001 From: Timur Tripp Date: Thu, 22 Aug 2024 12:36:25 -0600 Subject: [PATCH] CuBoulder/ucb_styled_block#1 Updates regular expression --- src/StyledBlockService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StyledBlockService.php b/src/StyledBlockService.php index 1a6fe21..3644ecd 100644 --- a/src/StyledBlockService.php +++ b/src/StyledBlockService.php @@ -57,7 +57,7 @@ public function icon($input) { if (preg_match('/fa-([a-z]|[0-9]|-)+/', $className, $classMatches)) { $classFa = $classMatches[0]; // Filters out any Font Awesome class that can't be an icon or style. - if (!preg_match('/fa-((2xs|xs|sm|lg|xl|2xl|([0-9]|10)x)|beat-fade|bounce|border|fade|flip-(horizontal|vertical|both)|fw|inverse|li|pull-(left|right)|rotate-(90|180|270|by)|shake|spin(-(pulse|reverse))?|sr-only(-focusable)?|stack(-(1|2)x)?|ul)$/', $classFa)) { + if (!preg_match('/^fa-((2xs|xs|sm|lg|xl|2xl|([0-9]|10)x)|beat-fade|bounce|border|fade|flip-(horizontal|vertical|both)|fw|inverse|li|pull-(left|right)|rotate-(90|180|270|by)|shake|spin(-(pulse|reverse))?|sr-only(-focusable)?|stack(-(1|2)x)?|ul)$/', $classFa)) { $output .= $output ? ' ' . $classFa : $classFa; } }