1 The pagespec regexes don't allow functions with no arguments.
3 IkiWiki.pm, around line 1035:
7 \s* # ignore whitespace
8 ( # 1: match a single word
15 \w+\([^\)]+\) # command(params)
17 [^\s()]+ # any other text
19 \s* # ignore whitespace
23 command(params) of course might be just command(). (See
24 conditional.pm: match_included.) Trying to feed
25 ikiwiki a pagespec without params will get you instead:
27 IkiWiki::PageSpec::match_glob($page, q{function}, @params) ( )
29 Which is completely not desired. The second + on that line should be a *.
31 None of the builtin pagespecs "work" with no parameters, so it's hard to
32 write a unit test for this. But can we at least write a helpful note in
33 case the user is given to rebuilding the wiki by hand. --Ethan
36 --- ikiwiki/IkiWiki.pm 2007-07-26 15:15:22.716860000 -0700
37 +++ ikidev/IkiWiki.pm 2007-07-26 21:34:45.542248000 -0700
42 - \w+\([^\)]+\) # command(params)
43 + \w+\([^\)]*\) # command(params)
45 [^\s()]+ # any other text
47 @@ -1075,6 +1075,10 @@
50 my $ret=eval pagespec_translate($spec);
52 + my $t = pagespec_translate($spec);
53 + print "evaluating pagespec failed: $t $@\n";
55 return IkiWiki::FailReason->new("syntax error") if $@;
60 > Thanks, [[done]] --[[Joey]]
62 > Note that the printing of the error isn't needed though. pagespec_match()
63 > returns an IkiWiki::FailReason object if parsing fails, and its caller
64 > can use that as desired to print the error.