fix: ThemeOptionSpec lehnt Zahlen mit Zeilenumbruch am Ende ab (D-Modifier)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Jan-Niclas Loosen
2026-10-19 18:26:35 +02:00
co-authored by Claude Sonnet 5.5
parent 942e4220ed
commit 901179de62
2 changed files with 3 additions and 1 deletions
@@ -239,7 +239,7 @@ final class ThemeOptionSpec
{
return match (true) {
is_int($value), is_float($value) => $value,
is_string($value) && preg_match('/^-?\d+(\.\d+)?$/', $value) === 1 => $value + 0,
is_string($value) && preg_match('/^-?\d+(\.\d+)?$/D', $value) === 1 => $value + 0,
default => null,
};
}