From aaea30ded44575c05b8451bc191b03fe2ecc9e02 Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Fri, 12 Mar 2004 11:05:21 +0000 Subject: [PATCH] escaping nowiki, pre, and code is non-greedy now. --- modules/toc.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/toc.pl b/modules/toc.pl index 5ef96291..a2c9a9df 100644 --- a/modules/toc.pl +++ b/modules/toc.pl @@ -16,7 +16,7 @@ # 59 Temple Place, Suite 330 # Boston, MA 02111-1307 USA -$ModulesDescription .= '

$Id: toc.pl,v 1.4 2004/02/09 20:41:36 as Exp $

'; +$ModulesDescription .= '

$Id: toc.pl,v 1.5 2004/03/12 11:05:21 as Exp $

'; *WikiHeading = *NewTocWikiHeading; @@ -42,6 +42,9 @@ sub NewTocGetHeader { sub TocHeadings { $page = GetPageContent(shift); # ignore all the stuff that gets processed anyway + foreach ('nowiki', 'pre', 'code') { + $page =~ s/<$_>(.*\n)*?+<\/$_>//gi; + } $page =~ s/(.*\n)*<\/nowiki>//gi; $page =~ s/
(.*\n)*<\/pre>//gi;
   $page =~ s/(.*\n)*<\/code>//gi;