diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-09-29 18:11:32 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-09-29 18:11:32 -0400 |
commit | 799bcbcd477653ff49aaee2e49818b62e40b6724 (patch) | |
tree | e9f7ede05d2c63e04969b0e081a159ec3a5b16c5 /IkiWiki/Plugin/conditional.pm | |
parent | a9d7c5453ae0f214f86043381310b81ad358b933 (diff) | |
parent | 0d3878896fa250cd1a6d4b1e7991714ca8478f36 (diff) |
Merge branch 'master' into tova
Diffstat (limited to 'IkiWiki/Plugin/conditional.pm')
-rw-r--r-- | IkiWiki/Plugin/conditional.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/conditional.pm b/IkiWiki/Plugin/conditional.pm index 7716fce1b..e787424aa 100644 --- a/IkiWiki/Plugin/conditional.pm +++ b/IkiWiki/Plugin/conditional.pm @@ -33,8 +33,8 @@ 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} =~ /^\s*\!?\s*(enabled|sourcepage|destpage|included)\((.*)\)\s*$/) { - add_depends($params{page}, "$params{test} and $params{page}"); + $params{test} =~ /^([\s\!()]*((enabled|sourcepage|destpage|included)\([^)]*\)|(and|or))[\s\!()]*)+$/) { + add_depends($params{page}, "($params{test}) and $params{page}"); $result=pagespec_match($params{page}, $params{test}, location => $params{page}, sourcepage => $params{page}, |