X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/21c6d61aa1b6caee6c37994f81469041265df61f..84b915d6d1fb9af543e0a6989c0920d10a1176e9:/IkiWiki/Plugin/table.pm

diff --git a/IkiWiki/Plugin/table.pm b/IkiWiki/Plugin/table.pm
index 02a2ba05d..20c71e1c7 100644
--- a/IkiWiki/Plugin/table.pm
+++ b/IkiWiki/Plugin/table.pm
@@ -22,6 +22,7 @@ sub preprocess (@) { #{{{
 			return "[[table ".gettext("cannot find file")."]]";
 		}
 		$params{data} = readfile(srcfile($params{file}));
+		add_depends($params{page}, $params{file});
 	}
 
 	if (lc $params{format} eq 'auto') {
@@ -173,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