aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/toggle.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-11-22 14:28:38 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-11-22 14:28:38 +0000
commit04a9dbfe7daa9c352ae4e9af17df8134248f3806 (patch)
tree253d6c60f0ebcdc7198ea9e67767400de711755d /IkiWiki/Plugin/toggle.pm
parent00c6f9e5cbed1ed0943d93aacdf63ce696133ca6 (diff)
downloadikiwiki-04a9dbfe7daa9c352ae4e9af17df8134248f3806.tar
ikiwiki-04a9dbfe7daa9c352ae4e9af17df8134248f3806.tar.gz
updates
Diffstat (limited to 'IkiWiki/Plugin/toggle.pm')
-rw-r--r--IkiWiki/Plugin/toggle.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/toggle.pm b/IkiWiki/Plugin/toggle.pm
index 92a89bd79..9e1afc08d 100644
--- a/IkiWiki/Plugin/toggle.pm
+++ b/IkiWiki/Plugin/toggle.pm
@@ -94,8 +94,11 @@ sub preprocess_toggleable (@) { #{{{
my $id=genid($params{page}, $params{id});
# Should really be a postprocessor directive, oh well. Work around
- # markdown's dislike of markdown inside a <div>.
- return "<div class=\"toggleable\" id=\"$id\"></div>\n\n$params{text}\n<div class=\"toggleableend\"></div>";
+ # markdown's dislike of markdown inside a <div> with various funky
+ # whitespace.
+ my ($indent)=$params{text}=~/( +)$/;
+ $indent="" unless defined $indent;
+ return "<div class=\"toggleable\" id=\"$id\"></div>\n\n$params{text}\n$indent<div class=\"toggleableend\"></div>";
} # }}}
sub format (@) { #{{{