allow inlined [[!toc]] despite its problems
[ikiwiki/toc.git] / toc.pm
diff --git a/toc.pm b/toc.pm
index ac07b9a..92605e3 100644 (file)
--- a/toc.pm
+++ b/toc.pm
@@ -27,7 +27,7 @@ my %tocpages;
 sub preprocess (@) {
        my %params=@_;
 
-       if ($params{page} eq $params{destpage}) {
+       #if ($params{page} eq $params{destpage}) {
                $params{levels}=1 unless exists $params{levels};
 
                # It's too early to generate the toc here, so just record the
@@ -35,12 +35,12 @@ sub preprocess (@) {
                $tocpages{$params{destpage}}=\%params;
 
                return "\n<div class=\"toc\"></div>\n";
-       }
-       else {
-               # Don't generate toc in an inlined page, doesn't work
-               # right.
-               return "";
-       }
+       #}
+       #else {
+       #       # Don't generate toc in an inlined page, doesn't work
+       #       # right.
+       #       return "";
+       #}
 }
 
 sub format (@) {