X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/cf35ee04cddd7b9b39636499dd24b689443c0e97..340fe9707c61064774658e6ec2aec3b07b33c120:/IkiWiki/Plugin/toggle.pm diff --git a/IkiWiki/Plugin/toggle.pm b/IkiWiki/Plugin/toggle.pm index 3f9c48672..df5a2a737 100644 --- a/IkiWiki/Plugin/toggle.pm +++ b/IkiWiki/Plugin/toggle.pm @@ -80,7 +80,13 @@ sub preprocess_toggle (@) { #{{{ my %params=(id => "default", text => "more", @_); my $id=genid($params{page}, $params{id}); - return "$params{text}"; + if (! $params{preview}) { + return "$params{text}"; + } + else { + return "$params{text} ". + gettext("(not toggleable in preview mode)"); + } } # }}} sub preprocess_toggleable (@) { #{{{