X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/ee1ad53c4c2710aa7ded61bdc56f3a8cce514f22..e78c25d1b2a4c428069abb7b5a4df5cb8fc1d060:/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});