summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/conditional.pm3
-rw-r--r--IkiWiki/Plugin/smiley.pm4
-rw-r--r--IkiWiki/Plugin/template.pm3
-rw-r--r--IkiWiki/Plugin/toggle.pm3
4 files changed, 8 insertions, 5 deletions
diff --git a/IkiWiki/Plugin/conditional.pm b/IkiWiki/Plugin/conditional.pm
index 35418a3ba..293fbc191 100644
--- a/IkiWiki/Plugin/conditional.pm
+++ b/IkiWiki/Plugin/conditional.pm
@@ -53,7 +53,8 @@ sub preprocess_if (@) { #{{{
else {
$ret="";
}
- return IkiWiki::preprocess($params{page}, $params{destpage}, $ret);
+ return IkiWiki::preprocess($params{page}, $params{destpage},
+ IkiWiki::filter($params{page}, $ret));
} # }}}
package IkiWiki::PageSpec;
diff --git a/IkiWiki/Plugin/smiley.pm b/IkiWiki/Plugin/smiley.pm
index 85a719337..45d00abea 100644
--- a/IkiWiki/Plugin/smiley.pm
+++ b/IkiWiki/Plugin/smiley.pm
@@ -34,10 +34,10 @@ sub setup () { #{{{
sub filter (@) { #{{{
my %params=@_;
- $params{content} =~ s{(?<=\s)(\\?)$smiley_regexp(?=\s)}{
+ $params{content} =~ s{(?:^|(?<=\s))(\\?)$smiley_regexp(?:(?=\s)|$)}{
$1 ? $2 : htmllink($params{page}, $params{page}, $smileys{$2}, 0, 0, $2)
}egs;
-
+
return $params{content};
} # }}}
diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm
index 23d9d65d8..16a3c1e37 100644
--- a/IkiWiki/Plugin/template.pm
+++ b/IkiWiki/Plugin/template.pm
@@ -50,7 +50,8 @@ sub preprocess (@) { #{{{
}
return IkiWiki::preprocess($params{page}, $params{destpage},
- $template->output);
+ IkiWiki::filter($params{page},
+ $template->output));
} # }}}
1
diff --git a/IkiWiki/Plugin/toggle.pm b/IkiWiki/Plugin/toggle.pm
index c68e30892..7318731c5 100644
--- a/IkiWiki/Plugin/toggle.pm
+++ b/IkiWiki/Plugin/toggle.pm
@@ -88,7 +88,8 @@ sub preprocess_toggleable (@) { #{{{
# Preprocess the text to expand any preprocessor directives
# embedded inside it.
- $params{text}=IkiWiki::preprocess($params{page}, $params{destpage}, $params{text});
+ $params{text}=IkiWiki::preprocess($params{page}, $params{destpage},
+ IkiWiki::filter($params{page}, $params{text}));
my $id=genid($params{page}, $params{id});