diff options
-rwxr-xr-x | rf | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -169,8 +169,13 @@ sub fmt { my $val = $ref{lc $fld}; $val = join '; ', @$val if lc $fld eq 'a'; $val = fmtl($val) if $fld eq 'A'; - $fmt =~ s/\{([^{}%]*)%\Q$fld\E([^{}]*)}/$1$val$2/g; - $fmt =~ s/%\Q$fld\E/$val/g; + if ($val =~ /\.$/) { + $fmt =~ s/\{([^{}%]*)%\Q$fld\E([^{}]*)}\.?/$1$val$2/g; + $fmt =~ s/%\Q$fld\E\.?/$val/g; + } else { + $fmt =~ s/\{([^{}%]*)%\Q$fld\E([^{}]*)}/$1$val$2/g; + $fmt =~ s/%\Q$fld\E/$val/g; + } } else { no warnings; $fmt =~ s/[.([]?\{([^{}%]*)%\Q$fld\E([^{}]*)}[.,?!:;\])]?//g; |