aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2010-07-11 11:04:59 +0200
committerintrigeri <intrigeri@boum.org>2010-07-11 11:04:59 +0200
commitd6f9d7743167cb4b58f16f1e371585f09dc15a0b (patch)
tree7dfd2541f5447e2db60e7a8d192c51865404549a
parent4a1cb092baabda6182fd291dfc9810f6c8efb17e (diff)
parent192ce7a238af9021b0fd6dd571f22409af81ebaf (diff)
downloadikiwiki-d6f9d7743167cb4b58f16f1e371585f09dc15a0b.tar
ikiwiki-d6f9d7743167cb4b58f16f1e371585f09dc15a0b.tar.gz
Merge remote branch 'upstream/filter-full' into prv/po
-rw-r--r--IkiWiki/Plugin/color.pm11
-rw-r--r--IkiWiki/Plugin/comments.pm2
-rw-r--r--IkiWiki/Plugin/conditional.pm3
-rw-r--r--IkiWiki/Plugin/cutpaste.pm8
-rw-r--r--IkiWiki/Plugin/more.pm6
-rw-r--r--IkiWiki/Plugin/sidebar.pm3
-rw-r--r--IkiWiki/Plugin/template.pm6
-rw-r--r--IkiWiki/Plugin/toggle.pm3
-rw-r--r--doc/plugins/write.mdwn4
9 files changed, 19 insertions, 27 deletions
diff --git a/IkiWiki/Plugin/color.pm b/IkiWiki/Plugin/color.pm
index d550dd9f4..9bb2359ce 100644
--- a/IkiWiki/Plugin/color.pm
+++ b/IkiWiki/Plugin/color.pm
@@ -61,12 +61,11 @@ sub replace_preserved_style ($) {
sub preprocess (@) {
my %params = @_;
- # Preprocess the text to expand any preprocessor directives
- # embedded inside it.
- $params{text} = IkiWiki::preprocess($params{page}, $params{destpage},
- IkiWiki::filter($params{page}, $params{destpage}, $params{text}));
-
- return preserve_style($params{foreground}, $params{background}, $params{text});
+ return preserve_style($params{foreground}, $params{background},
+ # Preprocess the text to expand any preprocessor directives
+ # embedded inside it.
+ IkiWiki::preprocess($params{page}, $params{destpage},
+ $params{text}));
}
sub format (@) {
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index f0eec9ace..851f4862e 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -143,8 +143,6 @@ sub preprocess {
}
$content =~ s/\\"/"/g;
- $content = IkiWiki::filter($page, $params{destpage}, $content);
-
if ($config{comments_allowdirectives}) {
$content = IkiWiki::preprocess($page, $params{destpage},
$content);
diff --git a/IkiWiki/Plugin/conditional.pm b/IkiWiki/Plugin/conditional.pm
index 8a5796149..026078b3c 100644
--- a/IkiWiki/Plugin/conditional.pm
+++ b/IkiWiki/Plugin/conditional.pm
@@ -59,8 +59,7 @@ sub preprocess_if (@) {
else {
$ret="";
}
- return IkiWiki::preprocess($params{page}, $params{destpage},
- IkiWiki::filter($params{page}, $params{destpage}, $ret));
+ return IkiWiki::preprocess($params{page}, $params{destpage}, $ret);
}
package IkiWiki::PageSpec;
diff --git a/IkiWiki/Plugin/cutpaste.pm b/IkiWiki/Plugin/cutpaste.pm
index 01e9ce043..4a8817168 100644
--- a/IkiWiki/Plugin/cutpaste.pm
+++ b/IkiWiki/Plugin/cutpaste.pm
@@ -50,8 +50,8 @@ sub preprocess_copy (@) {
$savedtext{$params{page}} = {} if not exists $savedtext{$params{"page"}};
$savedtext{$params{page}}->{$params{id}} = $params{text};
- return IkiWiki::preprocess($params{page}, $params{destpage},
- IkiWiki::filter($params{page}, $params{destpage}, $params{text})) if defined wantarray;
+ return IkiWiki::preprocess($params{page}, $params{destpage}, $params{text})
+ if defined wantarray;
}
sub preprocess_paste (@) {
@@ -70,8 +70,8 @@ sub preprocess_paste (@) {
error sprintf(gettext('no text was copied in this page with id %s'), $params{id});
}
- return IkiWiki::preprocess($params{page}, $params{destpage},
- IkiWiki::filter($params{page}, $params{destpage}, $savedtext{$params{page}}->{$params{id}}));
+ return IkiWiki::preprocess($params{page}, $params{destpage},
+ $savedtext{$params{page}}->{$params{id}});
}
1;
diff --git a/IkiWiki/Plugin/more.pm b/IkiWiki/Plugin/more.pm
index 266c8e1d0..80e339a1b 100644
--- a/IkiWiki/Plugin/more.pm
+++ b/IkiWiki/Plugin/more.pm
@@ -33,9 +33,9 @@ sub preprocess (@) {
anchor => "more");
}
else {
- $params{text}=IkiWiki::preprocess($params{page}, $params{destpage},
- IkiWiki::filter($params{page}, $params{destpage}, $params{text}));
- return "<a name=\"more\"></a>\n\n".$params{text};
+ return "<a name=\"more\"></a>\n\n".
+ IkiWiki::preprocess($params{page}, $params{destpage},
+ $params{text});
}
}
diff --git a/IkiWiki/Plugin/sidebar.pm b/IkiWiki/Plugin/sidebar.pm
index 2d495db2c..c1146b7b4 100644
--- a/IkiWiki/Plugin/sidebar.pm
+++ b/IkiWiki/Plugin/sidebar.pm
@@ -47,8 +47,7 @@ sub preprocess (@) {
$pagesidebar{$page}=
IkiWiki::htmlize($page, $page, $type,
IkiWiki::linkify($page, $page,
- IkiWiki::preprocess($page, $page,
- IkiWiki::filter($page, $page, $params{content}))));
+ IkiWiki::preprocess($page, $page, $params{content})));
}
return "";
diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm
index b8c2f05b2..db26bfe31 100644
--- a/IkiWiki/Plugin/template.pm
+++ b/IkiWiki/Plugin/template.pm
@@ -53,8 +53,7 @@ sub preprocess (@) {
foreach my $param (keys %params) {
my $value=IkiWiki::preprocess($params{page}, $params{destpage},
- IkiWiki::filter($params{page}, $params{destpage},
- $params{$param}), $scan);
+ $params{$param}, $scan);
if ($template->query(name => $param)) {
my $htmlvalue=IkiWiki::htmlize($params{page}, $params{destpage},
pagetype($pagesources{$params{page}}),
@@ -69,8 +68,7 @@ sub preprocess (@) {
}
return IkiWiki::preprocess($params{page}, $params{destpage},
- IkiWiki::filter($params{page}, $params{destpage},
- $template->output), $scan);
+ $template->output, $scan);
}
1
diff --git a/IkiWiki/Plugin/toggle.pm b/IkiWiki/Plugin/toggle.pm
index 3319421d9..20967d3fd 100644
--- a/IkiWiki/Plugin/toggle.pm
+++ b/IkiWiki/Plugin/toggle.pm
@@ -50,8 +50,7 @@ sub preprocess_toggleable (@) {
# Preprocess the text to expand any preprocessor directives
# embedded inside it.
- $params{text}=IkiWiki::preprocess($params{page}, $params{destpage},
- IkiWiki::filter($params{page}, $params{destpage}, $params{text}));
+ $params{text}=IkiWiki::preprocess($params{page}, $params{destpage}, $params{text});
my $id=genid($params{page}, $params{id});
my $class=(lc($params{open}) ne "yes") ? "toggleable" : "toggleable-open";
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index bb8012342..2e3902388 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -198,8 +198,8 @@ value is ignored.
hook(type => "filter", id => "foo", call => \&filter);
-Runs on the raw source of a page, before anything else touches it, and can
-make arbitrary changes. The function is passed named parameters "page",
+Runs on the full raw source of a page, before anything else touches it, and
+can make arbitrary changes. The function is passed named parameters "page",
"destpage", and "content". It should return the filtered content.
### preprocess