aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/conditional.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2007-12-28 16:55:20 -0500
committerJoey Hess <joey@kitenet.net>2007-12-28 16:55:20 -0500
commit63f62ef52059c4acc1306e50dd32671a20bd9d55 (patch)
tree357dd28420620cffd9b9d4bc701e1efd8d634602 /IkiWiki/Plugin/conditional.pm
parentf2c4939f3869e2678577b4274519702b5cea203c (diff)
downloadikiwiki-63f62ef52059c4acc1306e50dd32671a20bd9d55.tar
ikiwiki-63f62ef52059c4acc1306e50dd32671a20bd9d55.tar.gz
* conditional: Improve regexp testing for simple uses of pagespecs
that match only the page using the directive, adding 'included()' and supporting negated pagespecs and added whitespace.
Diffstat (limited to 'IkiWiki/Plugin/conditional.pm')
-rw-r--r--IkiWiki/Plugin/conditional.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/conditional.pm b/IkiWiki/Plugin/conditional.pm
index 2a25135fe..57db01054 100644
--- a/IkiWiki/Plugin/conditional.pm
+++ b/IkiWiki/Plugin/conditional.pm
@@ -24,7 +24,7 @@ sub preprocess_if (@) { #{{{
# An optimisation to avoid needless looping over every page
# and adding of dependencies for simple uses of some of the
# tests.
- $params{test} =~ /^(enabled|sourcepage|destpage)\((.*)\)$/) {
+ $params{test} =~ /^\s*\!?\s*(enabled|sourcepage|destpage|included)\((.*)\)\s*$/) {
add_depends($params{page}, "$params{test} and $params{page}");
$result=pagespec_match($params{page}, $params{test},
location => $params{page},