X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ee1ad53c4c2710aa7ded61bdc56f3a8cce514f22..b30fed47ea20c4b04c1cf9c68b6d69cfa0612c3a:/IkiWiki/Plugin/toggle.pm diff --git a/IkiWiki/Plugin/toggle.pm b/IkiWiki/Plugin/toggle.pm index 4a16ef32c..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 (@) { #{{{ @@ -89,7 +95,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{text})); + IkiWiki::filter($params{page}, $params{destpage}, $params{text})); my $id=genid($params{page}, $params{id});