Skip to content

Commit

Permalink
Merge pull request #14744 from craftcms/bugfix/14740-icon-svgs-ending…
Browse files Browse the repository at this point in the history
…-with-a-number

icons can end with a number

Fixes #14740
  • Loading branch information
brandonkelly authored Apr 2, 2024
2 parents 52d5fd8 + 65f2148 commit fc51765
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- Fixed a bug where the `_includes/nav.twig` template wasn’t marking nested nav items as selected. ([#14735](https://github.com/craftcms/cms/pull/14735))
- Fixed issues with menu options’ hover styles.
- Fixed a bug where double-clicking on an element’s linked label or action button would cause its slideout to open, in addition to the link/button being activated. ([#14736](https://github.com/craftcms/cms/issues/14736))
- Fixed a bug where system icons whose names ended in numbers weren’t displaying. ([#14740](https://github.com/craftcms/cms/issues/14740))

## 5.0.0 - 2024-03-26

Expand Down
2 changes: 1 addition & 1 deletion src/helpers/Cp.php
Original file line number Diff line number Diff line change
Expand Up @@ -2787,7 +2787,7 @@ public static function iconSvg(string $icon, ?string $fallbackLabel = null): str

try {
// system icon name?
if (preg_match('/^[a-z\-]+$/', $icon)) {
if (preg_match('/^[a-z\-]+(\d?)$/', $icon)) {
$path = match ($icon) {
'asterisk-slash', 'diamond-slash', 'element-card', 'element-card-slash', 'element-cards', 'graphql',
'grip-dots', 'image-slash', 'list-flip', 'list-tree-flip', 'share-flip' =>
Expand Down

0 comments on commit fc51765

Please sign in to comment.