]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
In preferences, allow the subscriptions and email fields to be cleared
[ikiwiki.git] / IkiWiki.pm
index d001760a205864aad7ce78c6d799d06444ffbc2a..46060c1b225e19fce4b8bf5e799f3f496dec3f43 100644 (file)
@@ -613,6 +613,8 @@ sub htmlize ($$$) { #{{{
        my $page=shift;
        my $type=shift;
        my $content=shift;
+       
+       my $oneline = $content !~ /\n/;
 
        if (exists $hooks{htmlize}{$type}) {
                $content=$hooks{htmlize}{$type}{call}->(
@@ -630,6 +632,14 @@ sub htmlize ($$$) { #{{{
                        content => $content,
                );
        });
+       
+       if ($oneline) {
+               # hack to get rid of enclosing junk added by markdown
+               # and other htmlizers
+               $content=~s/^<p>//i;
+               $content=~s/<\/p>$//i;
+               chomp $content;
+       }
 
        return $content;
 } #}}}