From b5993f142d65cb0f92c1774824c52c6fa3581cbe Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 10 Aug 2022 22:08:28 +0200 Subject: [PATCH] Incorrect use of the `{icon}` helper for the `regular` style --- extra/migrate-fa-v4.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extra/migrate-fa-v4.php b/extra/migrate-fa-v4.php index ea16b0a9a7..b76e0f67a1 100644 --- a/extra/migrate-fa-v4.php +++ b/extra/migrate-fa-v4.php @@ -26,6 +26,8 @@ fclose($fp); $iconShim = json_decode($json, true); function replaceTemplates(string $directory): void { + global $iconShim; + $knownSizes = [16, 24, 32, 48, 64, 96, 128, 144]; chdir(__DIR__); @@ -56,6 +58,10 @@ function replaceTemplates(string $directory): void { $type = 'solid'; } + if ($type === 'regular') { + return "{icon size={$size} name='{$newIconName}'}"; + } + return "{icon size={$size} name='{$newIconName}' type='{$type}'}"; }, $content, -- 2.20.1