diff options
author | Joey Hess <joey@kitenet.net> | 2010-07-12 15:35:40 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-07-12 15:35:40 -0400 |
commit | fd2b2f386f30cf2ba578da8a8174dd60ae024adc (patch) | |
tree | ffc7a9a5cc9a9bc510f577dcee01b27a6616e776 /IkiWiki/Plugin | |
parent | 911c9b01f1f8f710944791e523323b3bd1600378 (diff) | |
parent | 192ce7a238af9021b0fd6dd571f22409af81ebaf (diff) |
Merge branch 'filter-full'
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/color.pm | 11 | ||||
-rw-r--r-- | IkiWiki/Plugin/comments.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Plugin/conditional.pm | 3 | ||||
-rw-r--r-- | IkiWiki/Plugin/cutpaste.pm | 8 | ||||
-rw-r--r-- | IkiWiki/Plugin/more.pm | 6 | ||||
-rw-r--r-- | IkiWiki/Plugin/sidebar.pm | 3 | ||||
-rw-r--r-- | IkiWiki/Plugin/template.pm | 6 | ||||
-rw-r--r-- | IkiWiki/Plugin/toggle.pm | 3 |
8 files changed, 17 insertions, 25 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"; |