aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2010-11-19 23:59:04 +0000
committerSimon McVittie <smcv@debian.org>2010-11-19 23:59:04 +0000
commit788105e2a73a3be0f9a05a390702ee28318a5673 (patch)
treed0382a4fcbf24d1ed6a9d7da65aa0335c1a9870b
parent321bf7ec19641d12626c71f87792b4edf40aa306 (diff)
downloadikiwiki-788105e2a73a3be0f9a05a390702ee28318a5673.tar
ikiwiki-788105e2a73a3be0f9a05a390702ee28318a5673.tar.gz
glob2re: return a precompiled, anchored case-insensitive regex
In practice every use of glob2re uses it like that.
-rw-r--r--IkiWiki.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 57e23fda8..bb7d46ccf 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -2388,7 +2388,7 @@ sub glob2re ($) {
my $re=quotemeta(shift);
$re=~s/\\\*/.*/g;
$re=~s/\\\?/./g;
- return $re;
+ return qr/^$re$/i;
}
package IkiWiki::FailReason;