From d170d670018d08f05687621b8a1582fc9a030619 Mon Sep 17 00:00:00 2001 From: Ryan Voots Date: Fri, 12 Mar 2010 17:26:24 -0500 Subject: [PATCH] making some enhancements to the $1 code, to accept \$1 and ${1} correctly --- plugins/factoids.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/factoids.pm b/plugins/factoids.pm index 8527899..eebb508 100644 --- a/plugins/factoids.pm +++ b/plugins/factoids.pm @@ -342,7 +342,7 @@ sub _fact_substitute my ($matchstart, $matchend) = ($-[0], $+[0]); my @caps = map {substr($pred, $-[$_], $+[$_] - $-[$_])} 1..$#+; my $realsubst = $subst; - $realsubst =~ s/\$(\d+)/$caps[$1-1]/eg; + $realsubst =~ s/(?