diff --git a/src/flextype/core/Parsers/Shortcodes/CalcShortcode.php b/src/flextype/core/Parsers/Shortcodes/CalcShortcode.php index 9cf129b7..82e3de10 100644 --- a/src/flextype/core/Parsers/Shortcodes/CalcShortcode.php +++ b/src/flextype/core/Parsers/Shortcodes/CalcShortcode.php @@ -17,8 +17,8 @@ declare(strict_types=1); namespace Flextype\Parsers\Shortcodes; use Thunder\Shortcode\Shortcode\ShortcodeInterface; -use ChrisKonnertz\StringCalc\StringCalc; use function registry; +use function expression; // Shortcode: calc // Usage: (calc:2+2) @@ -27,5 +27,5 @@ parsers()->shortcodes()->addHandler('calc', static function (ShortcodeInterface return ''; } - return (new StringCalc())->calculate(parsers()->shortcodes()->parse($s->getBBCode())); + return expression()->evaluate(parsers()->shortcodes()->parse($s->getBBCode())); });