=================================================================== RCS file: /var/cvs/twiki/lib/TWiki.pm,v retrieving revision 1.1 retrieving revision 1.16 diff -u -p -r1.1 -r1.16 --- twiki/lib/TWiki.pm 2002/06/19 13:53:16 1.1 +++ twiki/lib/TWiki.pm 2003/03/14 14:38:02 1.16 @@ -726,6 +740,7 @@ sub makeTopicSummary # called by search, mailnotify & changes after calling readFileHead my $htext = $theText; + $htext =~ s/^[\n\r\s]*(.*?)\r*\n\s*\r*\n.*/$1/s; # limit to 1st paragraph $htext =~ s/<\!\-\-.*?\-\->//gos; # remove all HTML comments $htext =~ s/<\!\-\-.*$//os; # remove cut HTML comment $htext =~ s/<[^>]*>//go; # remove all HTML tags @@ -737,8 +752,8 @@ sub makeTopicSummary $htext =~ s/\-\-\-+\+*/ /go; # remove heading formatting $htext =~ s/\s+[\+\-]*/ /go; # remove newlines and special chars - # limit to 162 chars - $htext =~ s/(.{162})([a-zA-Z0-9]*)(.*?)$/$1$2 \.\.\./go; + # limit paragraph to 400 chars + $htext =~ s/(.{400})([a-zA-Z0-9]*)(.*?)$/$1$2 \.\.\./go; # inline search renders text, # so prevent linking of external and internal links: