]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Merge remote branch 'upstream/filter-full' into prv/po
authorintrigeri <intrigeri@boum.org>
Sun, 11 Jul 2010 09:04:59 +0000 (11:04 +0200)
committerintrigeri <intrigeri@boum.org>
Sun, 11 Jul 2010 09:04:59 +0000 (11:04 +0200)
IkiWiki/Plugin/color.pm
IkiWiki/Plugin/comments.pm
IkiWiki/Plugin/conditional.pm
IkiWiki/Plugin/cutpaste.pm
IkiWiki/Plugin/more.pm
IkiWiki/Plugin/sidebar.pm
IkiWiki/Plugin/template.pm
IkiWiki/Plugin/toggle.pm
doc/plugins/write.mdwn

index d550dd9f4b42ba7759b44b9571f0bc959e026423..9bb2359ce6f45f9ba452ad400aa48fc2c204584e 100644 (file)
@@ -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 (@) {
index f0eec9ace54ca4dc06fe74c866034f84c0bc8388..851f4862eb3a5a39bb0afb387b35dfc60262024d 100644 (file)
@@ -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);
index 8a57961491942438864c87a6ff1662b7d60a6439..026078b3ccf6751c26418d329a62f715b1bb5252 100644 (file)
@@ -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;
index 01e9ce043c90f2eb059f7abc6eb8093de717fb18..4a88171685b8d94cfaced062a9547ea8c3e6d401 100644 (file)
@@ -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;
index 266c8e1d0937dc9aefc677d536cc26a8d18e66c7..80e339a1be7c876e05820ba2da3e444d97770345 100644 (file)
@@ -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});
        }
 }
 
index 2d495db2cc0d02e1bc1abbc3653627374a8179ba..c1146b7b4394c7203f452ef36606c5a51242ea14 100644 (file)
@@ -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 "";
index b8c2f05b29ab4492453a91b16dff76f8d1521228..db26bfe315a254ddc8bdafef07abf83c4a819deb 100644 (file)
@@ -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
index 3319421d923d56c3489b7374edb912be7493027b..20967d3fd79e85fb5f0e677b0a7d76eb6e7ac38f 100644 (file)
@@ -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";
index bb80123423453c5d01a558569f48924e05fbba55..2e3902388f5c7bba8cc7d57fc39d288d8b2e4faf 100644 (file)
@@ -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