X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/67acb0463b327156cfc6e0e3450eb87604d854bd..683c1ebb4c510eac5bb2c2b4e85c3f7b5ded3146:/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 (@) { #{{{