diff options
-rwxr-xr-x | rf | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -169,6 +169,7 @@ sub fmt { my $val = $ref{lc $fld}; $val = join '; ', @$val if lc $fld eq 'a'; $val = fmtl($val) if $fld eq 'A'; + next if $fmt =~ s/\{([^{}%]*)%\Q$fld\E\|%[Aacdmnpqtwy]([^{}]*)}/$1$val$2/g; if ($val =~ /[.,?!]$/) { # fix double punctuation next if $fmt =~ s/\{([^{}%]*)%\Q$fld\E[.,?!]?([^{}]*)}/$1$val$2/g; $fmt =~ s/%\Q$fld\E[.,?!]?/$val/g @@ -178,6 +179,7 @@ sub fmt { } } else { # remove escape syntax after failed interpolation no warnings; + next if $fmt =~ s/\{([^{}%]*)%\Q$fld\E\|(%[Aacdmnpqtwy])([^{}]*)}/$1$2$3/g; next if $fmt =~ s/\{([^{}%]*)%\Q$fld\E([^{}]*)}[.,?!:;]?//g; $fmt =~ s/%\Q$fld\E[.,?!:;]?//g; } |