diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-01-09 14:35:23 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-01-09 14:35:23 -0500 |
commit | 2b9ce0129bc61177e976caf432af9b4406ab2f3f (patch) | |
tree | 74be3d536540070af41385e8b108c651073af52d /IkiWiki/Plugin/table.pm | |
parent | ed30330ac23ca84235e09cfc2f0acd55d62e4a09 (diff) |
* mdwn: When htmlizing text, if it's a single line with no newline,
remove the enclosing paragraph and newline markdown wraps it in.
This allows removing several hacks around this markdown behavior from
other plugins that htmlize fragements of pages.
Diffstat (limited to 'IkiWiki/Plugin/table.pm')
-rw-r--r-- | IkiWiki/Plugin/table.pm | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/IkiWiki/Plugin/table.pm b/IkiWiki/Plugin/table.pm index ddc2f68be..20c71e1c7 100644 --- a/IkiWiki/Plugin/table.pm +++ b/IkiWiki/Plugin/table.pm @@ -174,17 +174,9 @@ sub genrow ($$$@) { #{{{ sub htmlize ($$$) { #{{{ my $page = shift; my $destpage = shift; - my $text = shift; - - $text=IkiWiki::htmlize($page, pagetype($pagesources{$page}), - IkiWiki::preprocess($page, $destpage, $text)); - - # hack to get rid of enclosing junk added by markdown - $text=~s!^<p>!!; - $text=~s!</p>$!!; - chomp $text; - return $text; + return IkiWiki::htmlize($page, pagetype($pagesources{$page}), + IkiWiki::preprocess($page, $destpage, shift)); } 1 |