return if grep { $_ eq $plugin} @{$config{disable_plugins}};
+ foreach my $dir ($config{libdir}, "$installdir/lib/ikiwiki") {
+ if (defined $dir && -x "$dir/plugins/$plugin") {
+ require IkiWiki::Plugin::external;
+ import IkiWiki::Plugin::external "$dir/plugins/$plugin";
+ return 1;
+ }
+ }
+
my $mod="IkiWiki::Plugin::".possibly_foolish_untaint($plugin);
eval qq{use $mod};
if ($@) {
error("Failed to load plugin $mod: $@");
}
+ return 1;
} #}}}
sub error ($;$) { #{{{
my $command=shift;
my $params=shift;
if (length $escape) {
- return "\\[[$command $params]]";
+ return "[[$command $params]]";
}
elsif (exists $hooks{preprocess}{$command}) {
return "" if $scan && ! $hooks{preprocess}{$command}{scan};
return $ret;
}
else {
- return "\\[[$command $params]]";
+ return "[[$command $params]]";
}
};
|
\) # )
|
- \w+\([^\)]+\) # command(params)
+ \w+\([^\)]*\) # command(params)
|
[^\s()]+ # any other text
)