X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/54f600af14bf6dc067ffc30ec6f22d517001fe99..2f8bafb70947e8b2d6b8b2882e32dde60faa9a27:/IkiWiki/Plugin/toggle.pm diff --git a/IkiWiki/Plugin/toggle.pm b/IkiWiki/Plugin/toggle.pm index f9c899540..af4d2ba3a 100644 --- a/IkiWiki/Plugin/toggle.pm +++ b/IkiWiki/Plugin/toggle.pm @@ -50,8 +50,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{destpage}, $params{text})); + $params{text}=IkiWiki::preprocess($params{page}, $params{destpage}, $params{text}); my $id=genid($params{page}, $params{id}); my $class=(lc($params{open}) ne "yes") ? "toggleable" : "toggleable-open"; @@ -70,20 +69,19 @@ sub format (@) { if ($params{content}=~s!(
\s*)
!$1!g) { $params{content}=~s/
//g; if (! ($params{content}=~s!^(]*>)!$1.include_javascript($params{page})!em)) { - # no tag, probably in preview mode - $params{content}=include_javascript($params{page}, 1).$params{content}; + # no tag, probably in preview mode + $params{content}=include_javascript(undef).$params{content}; } } return $params{content}; } -sub include_javascript ($;$) { - my $page=shift; - my $absolute=shift; +sub include_javascript ($) { + my $from=shift; - return ''."\n". - ''; }