projects
/
ikiwiki.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
correction; unchanged pages not rescanned
[ikiwiki.git]
/
IkiWiki.pm
diff --git
a/IkiWiki.pm
b/IkiWiki.pm
index e6efe18891069f128ff19ab87de717218b0a8797..061a1c6db9f9560fb4b23766d975d4f76ccd5a45 100644
(file)
--- a/
IkiWiki.pm
+++ b/
IkiWiki.pm
@@
-157,6
+157,13
@@
sub getsetup () {
safe => 0, # path
rebuild => 0,
},
safe => 0, # path
rebuild => 0,
},
+ underlaydirbase => {
+ type => "internal",
+ default => "$installdir/share/ikiwiki",
+ description => "parent directory containing additional underlays",
+ safe => 0,
+ rebuild => 0,
+ },
wrappers => {
type => "internal",
default => [],
wrappers => {
type => "internal",
default => [],
@@
-715,7
+722,7
@@
sub add_underlay ($) {
my $dir=shift;
if ($dir !~ /^\//) {
my $dir=shift;
if ($dir !~ /^\//) {
- $dir="$config{underlaydir
}/..
/$dir";
+ $dir="$config{underlaydir
base}
/$dir";
}
if (! grep { $_ eq $dir } @{$config{underlaydirs}}) {
}
if (! grep { $_ eq $dir } @{$config{underlaydirs}}) {
@@
-1671,12
+1678,6
@@
sub rcs_receive () {
$hooks{rcs}{rcs_receive}{call}->();
}
$hooks{rcs}{rcs_receive}{call}->();
}
-sub safequote ($) {
- my $s=shift;
- $s=~s/[{}]//g;
- return "q{$s}";
-}
-
sub add_depends ($$) {
my $page=shift;
my $pagespec=shift;
sub add_depends ($$) {
my $page=shift;
my $pagespec=shift;
@@
-1778,6
+1779,7
@@
sub pagespec_translate ($) {
# Convert spec to perl code.
my $code="";
# Convert spec to perl code.
my $code="";
+ my @data;
while ($spec=~m{
\s* # ignore whitespace
( # 1: match a single word
while ($spec=~m{
\s* # ignore whitespace
( # 1: match a single word
@@
-1805,14
+1807,17
@@
sub pagespec_translate ($) {
}
elsif ($word =~ /^(\w+)\((.*)\)$/) {
if (exists $IkiWiki::PageSpec::{"match_$1"}) {
}
elsif ($word =~ /^(\w+)\((.*)\)$/) {
if (exists $IkiWiki::PageSpec::{"match_$1"}) {
- $code.="IkiWiki::PageSpec::match_$1(\$page, ".safequote($2).", \@_)";
+ push @data, $2;
+ $code.="IkiWiki::PageSpec::match_$1(\$page, \$data[$#data], \@_)";
}
else {
}
else {
- $code.="IkiWiki::ErrorReason->new(".safequote(qq{unknown function in pagespec "$word"}).")";
+ push @data, qq{unknown function in pagespec "$word"};
+ $code.="IkiWiki::ErrorReason->new(\$data[$#data])";
}
}
else {
}
}
else {
- $code.=" IkiWiki::PageSpec::match_glob(\$page, ".safequote($word).", \@_)";
+ push @data, $word;
+ $code.=" IkiWiki::PageSpec::match_glob(\$page, \$data[$#data], \@_)";
}
}
}
}