3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-30 07:59:42 +01:00

Factoids: Preserve case of indefinite article in expansions

This commit is contained in:
Pragmatic Software 2018-01-19 10:46:15 -08:00
parent 2b0deffc1c
commit 4311d6662d

View File

@ -477,6 +477,7 @@ sub expand_factoid_vars {
if ($a) { if ($a) {
my $fixed_a = select_indefinite_article $mylist[$line]; my $fixed_a = select_indefinite_article $mylist[$line];
$fixed_a = ucfirst $fixed_a if $a =~ m/^A/;
$action =~ s/$a\$$v$modifier/$fixed_a $mylist[$line]/; $action =~ s/$a\$$v$modifier/$fixed_a $mylist[$line]/;
} else { } else {
$action =~ s/\$$v$modifier/$mylist[$line]/; $action =~ s/\$$v$modifier/$mylist[$line]/;