From f55dfe54e1920d9eb9ca09e6519557cade22636b Mon Sep 17 00:00:00 2001 From: lookshe Date: Wed, 7 Mar 2012 15:31:53 +0100 Subject: some more fixes for wiki --- wiki2.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wiki2.pl b/wiki2.pl index f6fb6e2..dbf0fe4 100644 --- a/wiki2.pl +++ b/wiki2.pl @@ -32,7 +32,7 @@ if (defined $result) { $line=~ s/\s*$//; $comment = 1 if $line =~ m/^$/; - if ($line && $line =~ m/^\*\s?/) { + if ($line && $line =~ m/^\*\s?/ && $ln < 4) { push(@newlines, $newline); push(@newlines, $line); $newline = ""; @@ -51,10 +51,11 @@ if (defined $result) { my $lst = 0; foreach my $line (@newlines) { $line =~ s///g; - $line=~ s/.*}}//g; + $line=~ s/^.*}}//g; + $line=~ s/^[^\[]*\]\]//g; $line=~ s/^\s*//; $line=~ s/\s*$//; - if ($line !~ m/^\s*$/) { + if ($line !~ m/^\s*$/ && $line !~ m/^{{Infobox/) { $line = decode_entities($line); #$line =~ s/\([^\(\)]*\)||\[[^\[\]]*\]//g; $line =~ s/\[\[([^|\]]*\|)?([^\]]*)\]\]/$2/g; -- cgit v1.2.3