mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
Remove leading spaces when replacing empty factoid variable
This commit is contained in:
parent
25fd57087e
commit
0193800c1e
@ -482,7 +482,11 @@ sub expand_factoid_vars {
|
||||
$fixed_a = ucfirst $fixed_a if $a =~ m/^A/;
|
||||
$action =~ s/$a\$$v$modifier/$fixed_a $mylist[$line]/;
|
||||
} else {
|
||||
$action =~ s/\$$v$modifier/$mylist[$line]/;
|
||||
if (not length $mylist[$line]) {
|
||||
$action =~ s/\s+\$$v$modifier//;
|
||||
} else {
|
||||
$action =~ s/\$$v$modifier/$mylist[$line]/;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user