Merge branch 'filter-full'
commit
fd2b2f386f
|
@ -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 (@) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 "";
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue