Skip to content

Commit bf5d20b

Browse files
committed
fix
1 parent 1f3fe33 commit bf5d20b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Parsem/Parser.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ public static function parseString(mixed $string, array $arguments = [], bool $s
9292
foreach ($matches[1] as $key => $match) {
9393
if (isset($arguments[$match])) {
9494
$args[] = $arguments[$match];
95+
} else if (isset($arguments["default:$match"])) {
96+
$default = static::getDefaultValue($matches[2][$key]);
97+
if ($default !== static::LITERALLY_NULL) {
98+
$args[] = $default;
99+
} else {
100+
$args[] = $arguments["default:$match"];
101+
}
95102
} else {
96103
$default = static::getDefaultValue($matches[2][$key]);
97104
if ($default !== static::LITERALLY_NULL) {

0 commit comments

Comments
 (0)